• 0

Varables without the ? &


Question

How could i go about getting a php script take varables as such,

.php/VARABLE1/VARABLE2.png

example, .php/blue/hello.png

i belive i need to use a function but im lost with them

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

$vararray = explode( "/", $_SERVER['PATH_INFO'] );

That'll give you an array of { '.php', 'blue', 'hello.png' } in your example.

Link to comment
Share on other sites

  • 0

i got it :)

$varables = explode( "/", $_SERVER['PATH_INFO'] );

echo "$varables[1]";          // Would echo red
echo "<BR>"
echo "$varables[2]";          // Would echo 56.png

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.