Example: I have a $variable = "_foo", and I want to make absolutely sure that $variable does not start with an underscore "_". How can I do that in PHP? Is there some access to the char array behind the string?
Example: I have a $variable = _foo , and I want to make absolutely
Share
You might check out the
substrfunction in php and grab the first character that way:http://php.net/manual/en/function.substr.php