How do i add a variable to my function value? [RESOLVED]

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tintumon
Forum Newbie
Posts: 3
Joined: Sat Jan 01, 2011 7:15 am

How do i add a variable to my function value? [RESOLVED]

Post by tintumon »

this page has javascript and php, but because of the variables starting with $ im thinking this part is php.
im trying to get the querystring value in 'dir' and put in in the returnimages function but its not working.
any ideas?

Code: Select all

$pdir=$_GET['dir'];
function returnimages($dirname="C:/inetpub/wwwroot/sean/media/".$pdir."/")
sorry ive fixed this

Code: Select all

function returnimages() {
   $dirname = "C:/inetpub/wwwroot/sean/media/".$_GET['dir']."/";
Post Reply