two questions
how to write a php function that when input a string, the function will return a new string with the first letters of all the words from the input string?
how to write a same kind of function as the above, but instead of returning initials, it returns the exact string with underscopes replacing any space in the input string?
for example
$var = "ask yahoo";
returnInitial($var);
returnUnderscope($var);
and it will return something like "ay" and "ask_yahoo"
how to write a php function that when input a string, the function will return a new string with the first letters of all the words from the input string?
how to write a same kind of function as the above, but instead of returning initials, it returns the exact string with underscopes replacing any space in the input string?
for example
$var = "ask yahoo";
returnInitial($var);
returnUnderscope($var);
and it will return something like "ay" and "ask_yahoo"