Say you want the following code in the content area of your page:
Code:
<?php
echo "this is just a test";
$app->id = 300;
echo $app-id;
for($i=1; $i<=10; $i++){
echo "$i <br />";
}
?>
However, after you submit, the WYSIWYG converts the code to this:
Code:
<?php
echo "this is just a test";
$app->id = 300;
echo $app-id;
for($i=1; $i<=10; $i++){
echo "$i <br />";
}
?>
To prevent this, we will add //<!-- at beginning and // --> at end.
Code:
<?php
// <!--
echo "this is just a test";
$app->id = 300;
echo $app-id;
for($i=1; $i<=10; $i++){
echo "$i <br />";
}
// -->
?>
This is very similar to the old way of <!--#start-code #end-code--> tags, but the current version of the wysiwyg editor doesnt always support it correctly.