Jump to content

Split a variable into 2 variables


sager29

Recommended Posts

Is it possible to split a variable into 2 variables?

 

///  I have this sentence
$item = "Below Telegraph Hill, Smallwork Canvas Edition";

/// And I want to be able to do this
$item = "Below Telegraph Hill" ;
$medium = "Smallwork Canvas Edition";

 

Is it possible to find the comma in a string, and remove the comma & everything before or after it? Any recommendations would be appreciated.

Link to comment
https://forums.phpfreaks.com/topic/211224-split-a-variable-into-2-variables/
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.