even though you really don't notice the performance of using just one extra variable, there really is no need to in this case, and i would feel much better if you were learning how to program the most efficiently 🙂
do this:
$rest = substr($text, 0, 400) . " ...";
the period is the 'concatenate' operator, and is basically merging the substring and the " ..." together. this way you only have one variable, not to mention less lines to sift through.
some people might argue that this makes programs harder to read. so, at the very least, do this:
$rest = substr($text, 0, 400);
$rest .= " ...";
and this accomplishes the same thing, as the "+=" operator combines the new string with the old string.
bottom line, don't use extra variables unless you actually need to 🙂
cheers,
kyle
(besides, when you show someone who has programmed for years in PHP, wouldn't you rather have them be impressed you know how to code properly? learn from th beginning, and it works out in many ways to your advantage)