Jump to content

Recommended Posts

hi there,

PHP is great scripting language ! it does not restrict you for using other languages such as Javascript or any other. Well the solution can be done depending on the type of coding you are doing in the php (i mean you are dong embedding the php into the HTML or just using the whole php file) if you are using embedded style then there is no problem! you can use javascript as usual way you use in normal HTML page ! But you are using full php page and you are embedding HTML into the PHP tags then you should write script into the 'echo' or similar output sentences.

 

BEST OF LUCK !  :)

I've realised I worded that very badly. What I should have said was, in a html file, where should the [<? php include ("javascript_file.php")] go? I'm including a php file that is full of javascript to make the code more presentable, into a html file. I put it within the <head> tag

@Minimeallolla

The Php script will never interferes with the <head> or <meta> section of the file, taking that you have embedded it correctly. If you found it interfering the sections then its mainly due to improper embedding of PHP

 

About your second concern I am really not sure what you  trying to say !

PHP and JAVA have their different stands ! If you explains me what you meant to say i will definatly be helpful. As I have coded in both PHP and Java

That is what I was trying to say.

I havn't coded php for a while now but from memory if a meta tag is outside of the head tag it wont redirect and cause an error, or something along those lines. Don't worry, I don't really need help in with php just yet (:

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.