
Originally Posted by
neodjandre
i get confused with the backslashes.. why does my original code "<div class=\"lcp-customfield\">" have backslashes and your code doesn't ?
Don't fret about that too much, as it is purely a style of coding technique. He chose one that didn't require backslashes. If you want it to still use backslashes, you the following does exactly the same thing
PHP Code:
$lcp_customs .= "<div class=\"lcp-customfield" . $something . "\">" . $value . "</div>";
I wrote the above in a way that was very familiar to what you started with.
It could also be written like so:
PHP Code:
$lcp_customs .= "<div class=\"lcp-customfield{$something}\">{$value}</div>";
Bookmarks