Jump to content

brong112

New Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by brong112

  1.  

    All of the quotes need to be escaped or changed. You could try

    echo '<iframe src="' . $id . '" allowfullscreen="no" frameborder="0" height="125" width="182">';
     
    Or
    echo "<iframe src='$id' allowfullscreen='no' frameborder='0' height='125' width='182'>";

     

     

     

    Before I put the variable in.. I can't even get it to show with just a youtube link?  I'm lost..

    <?php
    
    echo '<iframe src="http://www.youtube.com/watch?v=IWOA6F2s6Nc" allowfullscreen="no" frameborder="0" height="125" width="182">';
    	
    
    ?>
    
    

    or

    <?php
    
    
    echo "<iframe src=" . 'http://www.youtube.com/watch?v=IWOA6F2s6Nc' . " allowfullscreen="no" frameborder="0" height="125" width="182">";
    	
    
    ?>
    

    ...screw this i'm playing video games.

  2. Thanks, I'm getting closer?  :sweat:

     

     

    <?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">";
    
    
    ?>
  3. 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.

  4. 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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.