Jump to content

Convert javascript to PHP


hi2you

Recommended Posts

You can't convert Javascript to PHP, but Javascript is extremely similar to PHP. The odds are that if you have a function or chunk of code in Javascript, you can probably tweak it a little to a similar thing in PHP.

 

However, PHP is read by the server, whereas Javascript is read by the browser, so different types of things can be manipulated in the different languages. Like many other languages, they compliment each other very well.

Link to comment
Share on other sites

Just a thought, is it possible to "echo" all the javascript code and it becomes PHP??

 

No. Thats makes no sense. maybe if you tell us what you need to do instead of guessing at solutions we might be able to actually help.

Link to comment
Share on other sites

I want to hide those code from the user.

 

You can't hide Javascript from the user. You could put it in an external file and call it, which will make it harder for the user to gain access to your code, but it's not possible to hide browser-driving code from the.. browser.

Link to comment
Share on other sites

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.