how to trim a string into two Integers and one string (php)? -
I have a query variable example "4X9"
How can I do this in 3 different variables Can I divide an integer 4, integer 9 and string x?
I tried to use
$ arr = explosion ('x', $ question); $ First = $ arr [0]; $ Bbefore = str_replace ('' ',' ', $ first); $ newBefore = (int) $ first; ` and for later.
list ($ first, $ x, after $) = str_split (str_replace ('' ',' ', $ question));
1) Explain the string using the character - 2) Use them to illustrate them. 3) If you can add integers after this line of code after
$ before and / or
$
list ($ $, $ X, $ after) = str_split (str_replace ('' ',' ', $ question)); $ = (int) $ first, $ = = (int) after $;
Comments
Post a Comment