Question:

Why are strings getting cut off in PHP when echoing?

by  |  earlier

0 LIKES UnLike

I'm trying to echo data from a sql database with PHP but if the string is too long, it is cut off at a certain point. I can display the same data in asp and its fine. Is there setting in the PHP.ini file that is doing this?

 Tags:

   Report

3 ANSWERS


  1. How many characters is the string?

    Without seeing some code or getting more detailed information it is hard to answer. It does sound like it is getting truncated though. There shouldn't be any reason to modify the php.ini for this case unless your string is absurdly long.


  2. Is it possible that the string contains escape characters, or something that might terminate the string by having a double-quote inside of the string that is returned.

  3. Maybe the string was longer than what that db field can accomodate, so it was truncated when you inserted it?

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.