Page 1 of 1

Adding Javascript Ad Code In PHP File

Posted: Tue Jan 29, 2008 7:49 am
by zahidprimex
Hii
I want to add a Javascript Ad Code In PHP File. How can I do it help plz

Re: Adding Javascript Ad Code In PHP File

Posted: Tue Jan 29, 2008 8:05 am
by Zoxive

Code: Select all

<?php
$Ad = '
<script type="text/javascript">
// My Javascript Code
</script>
';
 
echo $Ad;
 

Re: Adding Javascript Ad Code In PHP File

Posted: Tue Jan 29, 2008 8:07 am
by Ollie Saunders

Code: Select all

<?php
$foo = 1;
// here is some php
?>
<script type="text/javascript"><![CDATA[
alert('Here is JavaScript')
]]></script>
<?php
// whoops! here's PHP again

Re: Adding Javascript Ad Code In PHP File

Posted: Tue Jan 29, 2008 6:21 pm
by zahidprimex
Dear Zoxive
Thank For your help.Your code works very well.But the position of object written with javascript is on the top of the page. How can i place it on the bottom? How can I allign it in the middle of the page? Help me plz