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

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -