Jump to content

explode() in one line


rondog

Recommended Posts

I tried to do this:

explode(" ",$cp['size'])[0]

 

and it isn't working obviously. The reason I want it in one line is its in the middle of a big string and I'd like to keep all the code in one area. Is their a right way to do that other than setting it to a variable first?

Link to comment
https://forums.phpfreaks.com/topic/219942-explode-in-one-line/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.