peter.t Posted October 1, 2009 Share Posted October 1, 2009 hello, Got a rookie question for you. I've got a variable "wait.for.me". Is there a way that I can break this up into three variables? var1 = wait, var2 = for and var3 = me I'm just not sure of the terminology to search for this. Split string? Thanks! Link to comment https://forums.phpfreaks.com/topic/176216-split-variable/ Share on other sites More sharing options...
akitchin Posted October 1, 2009 Share Posted October 1, 2009 you're looking for explode. Link to comment https://forums.phpfreaks.com/topic/176216-split-variable/#findComment-928663 Share on other sites More sharing options...
Alex Posted October 1, 2009 Share Posted October 1, 2009 Sure, use explode() $var = 'wait.for.me'; $split = explode('.', $var); echo $split[0]; // wait echo $split[1]; // for Link to comment https://forums.phpfreaks.com/topic/176216-split-variable/#findComment-928664 Share on other sites More sharing options...
peter.t Posted October 1, 2009 Author Share Posted October 1, 2009 Thanks!!! Link to comment https://forums.phpfreaks.com/topic/176216-split-variable/#findComment-928673 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.