wmguk
03-17-2008, 08:31 AM
1) Script Title: PHP Photo Album script
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm
3) Describe problem:
Hey, I am trying to use a mix of php and this code, and i need to get the variable title out of this code into a php variable called name
function buildimage(i){
var imagecompletepath=(targetlinkdir!="")? targetlinkdir+galleryarray[i][0] : imagepath+galleryarray[i][0]
var tempcontainer='<a href="'+imagecompletepath+'" target="'+href_target+'" onClick="return popuplinkfunc(this)">'
tempcontainer+='<img src="'+imagepath+galleryarray[i][0]+'" title="'+galleryarray[i][0]+'"/>'
tempcontainer+='</a><br />'
tempcontainer+=(descriptionprefix[0]==1)? descriptionprefix[1]+(i+1) : ""
return tempcontainer
}
specifically looking at
title="'+galleryarray[i][0]+'"
I have already tried <? $name = '+galleryarray[i][0]+' ; ?> however as expected i just get the '+galleryarray[i][0]+' rather than the actual item...
any thoughts?
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm
3) Describe problem:
Hey, I am trying to use a mix of php and this code, and i need to get the variable title out of this code into a php variable called name
function buildimage(i){
var imagecompletepath=(targetlinkdir!="")? targetlinkdir+galleryarray[i][0] : imagepath+galleryarray[i][0]
var tempcontainer='<a href="'+imagecompletepath+'" target="'+href_target+'" onClick="return popuplinkfunc(this)">'
tempcontainer+='<img src="'+imagepath+galleryarray[i][0]+'" title="'+galleryarray[i][0]+'"/>'
tempcontainer+='</a><br />'
tempcontainer+=(descriptionprefix[0]==1)? descriptionprefix[1]+(i+1) : ""
return tempcontainer
}
specifically looking at
title="'+galleryarray[i][0]+'"
I have already tried <? $name = '+galleryarray[i][0]+' ; ?> however as expected i just get the '+galleryarray[i][0]+' rather than the actual item...
any thoughts?