i have been saving buffer content in a mysql text field , but when content exceeded the number of characters limit, code is crunched.
so how can i optimize html buffer content by removing tabs and white spaces from the code using php ?
i have been saving buffer content in a mysql text field , but when content exceeded the number of characters limit, code is crunched.
so how can i optimize html buffer content by removing tabs and white spaces from the code using php ?
Why don't you use a type able to keep all your data? E.g. LONGTEXT or MEDIUMTEXT? You can however strip away all repetition of space character using
preg_replace("/\s+/", " ", trim($s));
ADD
As noticed in comments, this will crunch every repeated "space" character even when it's meaningful. This won't work with default pre tag style, and with any other tag with CSS that changes the white-space attribute.