PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Vegan
Forum Regular
Posts: 574 Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:
Post
by Vegan » Wed Jun 27, 2018 12:29 am
el code
so I wanted to have each item on a new line
Code: Select all
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™
My site is powered by LAMP
Christopher
Site Administrator
Posts: 13596 Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US
Post
by Christopher » Wed Jun 27, 2018 12:52 pm
HTML line breaks:
Code: Select all
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)
Vegan
Forum Regular
Posts: 574 Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:
Post
by Vegan » Wed Jun 27, 2018 3:13 pm
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™
My site is powered by LAMP
Vegan
Forum Regular
Posts: 574 Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:
Post
by Vegan » Wed Jun 27, 2018 3:25 pm
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™
My site is powered by LAMP
Vegan
Forum Regular
Posts: 574 Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:
Post
by Vegan » Wed Sep 19, 2018 2:58 pm
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™
My site is powered by LAMP
Christopher
Site Administrator
Posts: 13596 Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US
Post
by Christopher » Wed Sep 19, 2018 10:07 pm
Well, at least it is working now...
(#10850)