Hello again,
I need to count all the characters that a string contains. For example:
#string#=“directory/subidretory/index.html”
I need to know how many slashes are in this string. I can’t find any funcion that finds characters asd PHP, any idea?
Hello again,
I need to count all the characters that a string contains. For example:
#string#=“directory/subidretory/index.html”
I need to know how many slashes are in this string. I can’t find any funcion that finds characters asd PHP, any idea?
Hello
Try listlen using “/” as the deliminator.
Thanks
J
sorry MrJman, wich function I should use to do that?
thank you.
Hello
You can use ListLen(string, “/”), this will split the string on each / you will then need to -1 from the count of the result and this should give you the /
<cfset slashCount = ListLen(string, “/”) - 1>
Thanks
J
Thank you a lot. It works!