PHP string truncation
-
Hello, I need help with a simple problem: if I read a text from a file (PHP) $text=fgets(...) variable, say we it's having about 3000 characters, how can I trunate it to a fixed length so I'll get a shortcut :-) something like char *text="aaaaaaaaaaaaaaaaaaaaaa"; text[10]='\0'; in C++ thanx a lot
-
Hello, I need help with a simple problem: if I read a text from a file (PHP) $text=fgets(...) variable, say we it's having about 3000 characters, how can I trunate it to a fixed length so I'll get a shortcut :-) something like char *text="aaaaaaaaaaaaaaaaaaaaaa"; text[10]='\0'; in C++ thanx a lot
substr
possibly?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for - in order to get to the job you need to pay for the clothes and the car, and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
-
substr
possibly?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for - in order to get to the job you need to pay for the clothes and the car, and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman