This topic is locked

ASP to PHP code changes

4/1/2012 11:39:42 AM
PHPRunner General questions
S
scoobysteve author

OK can anyone tell me how to change the following that works in ASPRunner into the correct form for PHPRunner in the Custom View option
strValue = "<iframe width=""320"" height=""240"" src=""" & strValue & """ frameborder=""0"" allowfullscreen></iframe>"
Many thanks in advance

Steve

C
cgphp 4/1/2012
$value = "<iframe width='320' height='240' src='". $value .'" frameborder='0' allowfullscreen></iframe>";
S
scoobysteve author 4/1/2012

Thanks I tried that and got a syntax error ??
Regards

Steve

C
cgphp 4/1/2012

Please, post the error.

S
scoobysteve author 4/1/2012



Please, post the error.


Here it is
syntax error, unexpected T_LNUMBER in line 1
Thanks

Steve

C
cgphp 4/1/2012

Try this version:

$value = "<iframe width='320' height='240' src='". $value ."' frameborder='0' allowfullscreen></iframe>";
S
scoobysteve author 4/1/2012



Try this version:

$value = "<iframe width='320' height='240' src='". $value ."' frameborder='0' allowfullscreen></iframe>";



Its almost working when I use the above there are no syntax errors but the video does not play, when I look at the page code its missing a open quote as seen below at the src= section and I cant seem to add this in there without casuing a syntax error ??? Thanks for your help muchy appreciated. Steve
<iframe width='320' height='240' src=http://www.youtube.com/embed/xW9d5wR_vwM"; frameborder='0' allowfullscreen></iframe>

C
cgphp 4/1/2012

Are you using my last code?

$value = "<iframe width='320' height='240' src='". $value ."' frameborder='0' allowfullscreen></iframe>";
S
scoobysteve author 4/1/2012



Are you using my last code?

$value = "<iframe width='320' height='240' src='". $value ."' frameborder='0' allowfullscreen></iframe>";



Yes I think I have kind of sorted it, I removed some of it and now ask my members to add the full url of the video so it works now. Thanks for your help.
$value = "<iframe width='320' height='240' $value frameborder='0' allowfullscreen></iframe>";