php - Explode datalist into array -


I've found a list of data in the following format:

  data \ ndata \ N data \ n data \ n data \ n  

now I

  $ array = explosion ("\ N", $ data list);  

What happens next is that there is no key with any data, I think it's finally \ n.

Is there any way to explode it so that the last key was not set?

Thank you!

After you explode, use the last item to pop:

< Pre> $ array = explode ("\ n", $ dataList); Array_pop ($ array);

If you can add by using a statement and if you want to see that there is something other than a lineback character in the last thing, but you should do what you need.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -