brong112
-
Posts
4 -
Joined
-
Last visited
Posts posted by brong112
-
-
Thanks, I'm getting closer?
<?php $xml=simplexml_load_file("http://x.com/demo/statefarm/id.xml"); $id = $xml->customid; echo '<iframe src=' .$id . ' allowfullscreen="no" frameborder="0" height="125" width="182">'; ?>
<?php $xml=simplexml_load_file("http://x.com/demo/statefarm/id.xml"); $id = $xml->customid; echo "<iframe src=\"$id/\" allowfullscreen="no" frameborder="0" height="125" width="182">"; ?>
-
echo $id
Missing a semicolon. It works in the first one because it's the last statement within the <?php block. It's not the last statement in the second one.echo "<iframe src="$id" allowfullscreen="no" frameborder="0" height="125" width="182">"
1. Missing a semicolon. Yes, last statement, but do it anyway.2. Strings
thanks for the reply..
So I have this
<?php $xml=simplexml_load_file("http://x.com/demo/statefarm/id.xml"); $id = $xml->customid; echo "<iframe src="$id" allowfullscreen="no" frameborder="0" height="125" width="182">"; ?>
and
<?xml version="1.0" encoding="ISO-8859-1"?> <message> <customid>http://www.youtube.com/watch?v=gkTb9GP9lVI</customid> </message>
here's my xml file
If I try and echo just the id, it works fine. It only shows as a blank page when I'm putting it in the iframe.
Edit..
I can't find the right string. I've tried over and over again.
-
I used to have an acc at phpfreaks.. started coding again. I'd appreciate some help cuz this is pissing me off..
<?php $xml=simplexml_load_file("http://X/demo/statefarm/id.xml"); $id = $xml->customid; echo $id ?>
This works fine
<?php $xml=simplexml_load_file("http://x.com/demo/statefarm/id.xml"); $id = $xml->customid; echo $id echo "<iframe src="$id" allowfullscreen="no" frameborder="0" height="125" width="182">" ?>
This dosen't. I have tried every combination of syntax and google and I just get a blank page. I'd appreciate some help, thanks.
Please help with echo youtube id.. simple
in PHP Coding Help
Posted · Edited by brong112
Before I put the variable in.. I can't even get it to show with just a youtube link? I'm lost..
or
...screw this i'm playing video games.