
This is one of the most asked questions and it's actually one of the easiest things to do. Follow this general rule and you should be ok. The first thing to do is take a look at the codes and see if the amount of double quotes [ " ] exceeds the amount of single quote [ ' ] or vice versa. Like in the example below.
<script language="JavaScript" >
myimages[1]="image1.gif"
myimages[2]="image2.gif"
</script>
By doing a count I see there are 6 double quotes and no single quote which makes this a very easy script to add. What we are going to do is use single quote to enclose the script as seen in the following.
$content = '<script language="JavaScript" >
myimages[1]="image1.gif"
myimages[2]="image2.gif"
</script>';
Notice where the single quotes are, now if the script was the opposite and there were 6 single quotes then we would do the opposite and use double quotes to enclose the script as in the example below.
$content = "<script language='JavaScript' >
myimages[1]='image1.gif'
myimages[2]='image2.gif'
</script>";
I know your next question, what if there are both single and double quotes in the script, well i'll show you how add those. Below is an example script
<script language="JavaScript" >
myimages[1]='image1.gif'
myimages[2]='image2.gif'
</script>
As you may remember from what i told you in the first part of this tutorial which is to see which of the two are more. In this case we have more single quotes [ 4 ] than double quotes [2]. So what we will do is surround the script in double quotes since those are less and use slashes [\] to mark out the double quotes in the script like the following.
$content = "<script language=\"JavaScript\" >
myimages[1]='image1.gif'
myimages[2]='image2.gif'
</script>";
If you were using single quotes then you do the opposite as below.
$content = '<script language="JavaScript" >
myimages[1]=\'image1.gif\'
myimages[2]=\'image2.gif\'
</script>';
I hope this gives you a better understanding but if you have any questions feel free to ask.
That's All! Visit our forums for more help.

Marketplace Themes, scripts, icons and images
Themes site PHP Nuke themes preview site.
234
13,482