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 Quote 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. Quote 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 Quote 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... Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.