Welcome Guest, Not a member yet? Register   Sign In
convert javascript code to php
#1

[eluser]ranjitbd[/eluser]
//this is the link
Code:
<a href="&lt;?=base_url()?&gt;">Travelmartbd.com</a>

//this is the function

&lt;?php
class Miscellaneous extends Controller {

  function goToTmbd()
  {
      echo “[removed]
                var uri = ‘http://www.travelmartbd.com’;
                [removed].href=uri;
            [removed]”;
  }
}
?&gt;

//i want to write this function without javascript.i want to do it through raw php
within goToTmbd() method.
#2

[eluser]ranjitbd[/eluser]
Code:
//this is the link

<a href="&lt;?=base_url()?&gt;">Travelmartbd.com</a>

//this is the function

&lt;?php
class Miscellaneous extends Controller {

  function goToTmbd()
  {
      echo “[removed]                       // here the code was [removed]
                var uri = ‘http://www.travelmartbd.com’;
                [removed].href=uri; // here the code was [removed]
            [removed]”;                   // here the code was [removed]  
  }
}
?&gt;

//i want to write this function without javascript.i want to do it through raw php
within goToTmbd() method.
#3

[eluser]ranjitbd[/eluser]
Code:
//this is the link

<a href="&lt;?=base_url()?&gt;">Travelmartbd.com</a>

//this is the function

&lt;?php
class Miscellaneous extends Controller {

  function goToTmbd()
  {
      echo “[removed]               // here the code was script tag
                var uri = ‘http://www.travelmartbd.com’;
                [removed].href=uri; // here the code was window&middot;location
            [removed]”;             // here the code was end of script tag  
  }
}
?&gt;

//i want to write this function without javascript.i want to do it through raw php
within goToTmbd() method.




Theme © iAndrew 2016 - Forum software by © MyBB