Get first letter of a word using PHP -


Is it possible to set variable validation only if the S in the front of the variable?

Example in my code:

  $ a = "S0225"; $ B = "700 S4"; If (SRPO ($ A, 's')! == incorrect) {"echo"; // will pass this for it} if (SRPO ($ B, 'S')! == incorrect) {echo "PASS"; // For this reason, why is it too close, while I just want the beginning of the variable for the beginning of the S}    

You can also use it for this purpose

  if (substr ($ string_goes_here, 0, 1) === 'S') {// Pass}    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -