Jump to content

remove lines from variable


mysterbx

Recommended Posts

Hello,

 

I need some help with a code, i need a code, that would remove the first line and show others...

 

Example:

 

$text = "line1\nline2\nline3\nline4\n";

 

Output:

 

line2

line3

line4

 

(line1 has to be removed with some code, maybe preg_replace... i dont know... thats why im asking :) )

 

Any help would be great

Link to comment
https://forums.phpfreaks.com/topic/87644-remove-lines-from-variable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.