scarhand Posted January 27, 2011 Share Posted January 27, 2011 My current code (which works): <?php $body = explode("\n", $body); $body = array_slice($body, 3); $body = implode("\n", $body); ?> Is there a better way of doing this, so I dont have to explode and implode an array just to accomplish this? Link to comment https://forums.phpfreaks.com/topic/225883-better-way-to-remove-first-3-lines/ Share on other sites More sharing options...
litebearer Posted January 27, 2011 Share Posted January 27, 2011 substr? Link to comment https://forums.phpfreaks.com/topic/225883-better-way-to-remove-first-3-lines/#findComment-1166175 Share on other sites More sharing options...
BlueSkyIS Posted January 27, 2011 Share Posted January 27, 2011 preg_replace? Link to comment https://forums.phpfreaks.com/topic/225883-better-way-to-remove-first-3-lines/#findComment-1166176 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.