williamZanelli Posted October 22, 2008 Share Posted October 22, 2008 Hey guys, I want to break a string into 2 chunks, my string is something like "select xyz from x_table where something = true LIMIT 0, 12" I want to break the string at the point of LIMIT, i.e. anything *after* limit is a seperate string, anything before is another. I will always have 2 strings, i) How do I break up the string - can't see how this is accomplished using substring ii) How do I access bits of the string, I know there will only be 2 strings.. is it via an array stringBits[0], stringBits[1] etc.. Thanks in advance, William Link to comment https://forums.phpfreaks.com/topic/129541-solved-substring-problem/ Share on other sites More sharing options...
JasonLewis Posted October 22, 2008 Share Posted October 22, 2008 Look into the explode() function. Link to comment https://forums.phpfreaks.com/topic/129541-solved-substring-problem/#findComment-671634 Share on other sites More sharing options...
williamZanelli Posted October 22, 2008 Author Share Posted October 22, 2008 Thanks, works like a charm! Link to comment https://forums.phpfreaks.com/topic/129541-solved-substring-problem/#findComment-671654 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.