iversonm Posted September 19, 2008 Share Posted September 19, 2008 ok so again with these messed up questions so lets say $state="This is the first line this is the second line this is the third line this is the forth line this is the fifth line"; lets say i only want to echo the first three lines of $state i have no idea were to even start Link to comment https://forums.phpfreaks.com/topic/124976-solved-limit-statement-to-certain-number-of-breaks/ Share on other sites More sharing options...
Maq Posted September 19, 2008 Share Posted September 19, 2008 Look up explode. You can explode a string into pieces with a delimiter as a line break. After that, use a for loop to loop through and display as many lines as you want. Link to comment https://forums.phpfreaks.com/topic/124976-solved-limit-statement-to-certain-number-of-breaks/#findComment-645728 Share on other sites More sharing options...
iversonm Posted September 19, 2008 Author Share Posted September 19, 2008 wooowww i cant believe myself right now, oh well we all have our stupid moments, just some people like myself have them more often thanks Maq Link to comment https://forums.phpfreaks.com/topic/124976-solved-limit-statement-to-certain-number-of-breaks/#findComment-645731 Share on other sites More sharing options...
Maq Posted September 19, 2008 Share Posted September 19, 2008 Glad I could help. oh well we all have our stupid moments You got that right... Link to comment https://forums.phpfreaks.com/topic/124976-solved-limit-statement-to-certain-number-of-breaks/#findComment-645732 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.