08-01-2008, 07:48 AM
Whats up guys! I am trying to figure out how I can embed PHP codes in javascrip page but I cant find the way.can you halp me if there is any way
08-01-2008, 07:59 AM
08-01-2008, 08:05 AM
That one I know,but the thing is I have a page saved in .js extension and I want to embed php in it.is it going to work that way?
08-01-2008, 09:26 AM
Save your script file with a php extension, say myfile.js.php and then add a php header at the beginning, like
alert('<?php echo "hello";?>');
echo "alert('another hello :)')"
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.