Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

how do ia insert the </br> tag on PHP?


  • Please log in to reply
2 replies to this topic

#1 lil-fino

lil-fino

    CC Newcomer

  • Just Joined
  • PipPip
  • 15 posts

Posted 03 April 2010 - 10:33 AM

sorry for my stupid question but i am really new at this.

I have this php script and i want to use the </br> tag so its not a single line when showing the XML text.
Where do i put it?

<?php

$file = "pet.xml";
$xml = simplexml_load_file($file) or die ("Unable to load XML file!");

echo "Name: " . $xml->name . "\n";
echo "Age: " . $xml->age . "\n";
echo "Species: " . $xml->species . "\n";
echo "Parents: " . $xml->parents->mother . " and " .  $xml->parents->father . "\n";

?>

  • 0

#2 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 03 April 2010 - 10:51 AM

\n should be replaced with <br /> in each case.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#3 lil-fino

lil-fino

    CC Newcomer

  • Just Joined
  • PipPip
  • 15 posts

Posted 03 April 2010 - 10:54 AM

thanks man!
it works perfect :D
  • 0




Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download