PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Wed Dec 19, 2018 11:27 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: cleaning up some output
PostPosted: Wed Jun 27, 2018 12:29 am 
Offline
Forum Regular

Joined: Fri Sep 05, 2008 3:34 pm
Posts: 533
Location: Victoria, BC
el code

so I wanted to have each item on a new line

Syntax: [ Download ] [ Hide ]
echo '<strong>IP Address</strong>:- '.$ip;;
echo '<strong>City</strong>:- '.$city;  
echo '<strong>Country</strong>:- '.$country;  
echo '<strong>Country Code</strong>:- '.$country_code;
echo '<strong>Currency Code</strong>:- '.$currency_code;  
echo '<strong>Latitude </strong>:- '.$latitude;  
echo '<strong>Longitude </strong>:- '.$longitude;  
 


echo '\n\l' does not work, do does <br> etc etc

using a php plugin to add snippets

_________________
Hardcore Games Legendary is the Only Way to Play!
Vegan Advocate 16 lbs grain to make only 1 lb meat, water for 6 months of showers and 34.1 lbs carbon dioxide
My sites are made with WordPress, which is a content management system which now accounts for more than 60% of all websites


Top
 Profile  
 
PostPosted: Wed Jun 27, 2018 12:52 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13585
Location: New York, NY, US
HTML line breaks:
Syntax: [ Download ] [ Hide ]
echo '<strong>IP Address</strong>:- '.$ip . '<br>';
echo '<strong>City</strong>:- '.$city . '<br>';  
echo '<strong>Country</strong>:- '.$country . '<br>';  
echo '<strong>Country Code</strong>:- '.$country_code . '<br>';
echo '<strong>Currency Code</strong>:- '.$currency_code . '<br>';  
echo '<strong>Latitude </strong>:- '.$latitude . '<br>';  
echo '<strong>Longitude </strong>:- '.$longitude . '<br>';  
 

_________________
(#10850)


Top
 Profile  
 
PostPosted: Wed Jun 27, 2018 3:13 pm 
Offline
Forum Regular

Joined: Fri Sep 05, 2008 3:34 pm
Posts: 533
Location: Victoria, BC
I tried that and it seems that WP does not accept the line breaks properly. I have also tried PHP_EOL etc.

Wonder if I need to do something more?

_________________
Hardcore Games Legendary is the Only Way to Play!
Vegan Advocate 16 lbs grain to make only 1 lb meat, water for 6 months of showers and 34.1 lbs carbon dioxide
My sites are made with WordPress, which is a content management system which now accounts for more than 60% of all websites


Top
 Profile  
 
PostPosted: Wed Jun 27, 2018 3:25 pm 
Offline
Forum Regular

Joined: Fri Sep 05, 2008 3:34 pm
Posts: 533
Location: Victoria, BC
curious after adding echo $nbsp; which did not render, removing it seems to have fixed it, bizzare effect

_________________
Hardcore Games Legendary is the Only Way to Play!
Vegan Advocate 16 lbs grain to make only 1 lb meat, water for 6 months of showers and 34.1 lbs carbon dioxide
My sites are made with WordPress, which is a content management system which now accounts for more than 60% of all websites


Top
 Profile  
 
PostPosted: Wed Sep 19, 2018 2:58 pm 
Offline
Forum Regular

Joined: Fri Sep 05, 2008 3:34 pm
Posts: 533
Location: Victoria, BC
after a few updates it seems to be working fine now, wonder if there was something wrong in wordpress....

_________________
Hardcore Games Legendary is the Only Way to Play!
Vegan Advocate 16 lbs grain to make only 1 lb meat, water for 6 months of showers and 34.1 lbs carbon dioxide
My sites are made with WordPress, which is a content management system which now accounts for more than 60% of all websites


Top
 Profile  
 
PostPosted: Wed Sep 19, 2018 10:07 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13585
Location: New York, NY, US
Well, at least it is working now...

_________________
(#10850)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Exabot [Bot], Majestic-12 [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group