How to 'pause' echo, with solution

Status
Not open for further replies.

Deezi

I have a custom title
Nov 14, 2016
50
12
**I don't know how many others have run into this problem, or if it is only me being a moron for not figuring it out sooner, but I decided to post it with the solutions regardless just in case!**

How can I 'pause' an echo?
I am trying to output a username after I have done a if/else, to check if he is logged in or not, if he is logged in , it's going to change the "login" section, with "Signed in as $_SESSION['uid'] (username)"
How can I pause the echo, so I can write the echo for session uid, which is not working at the moment?
E25Pixl.png

SOLUTION
Just before I posted this question, I started thinking, and I remember something I saw in a CMS for retro's once, which was basically for the same thing, so I tried it, and is now actually working fine.
So basically to "pause" your echo, you just have to end it, add a . write your variable or whatever you are trying to do, add another . and then start the echo back up.
ORAiwjj.png


Example:
Code:
<?php

echo "Signed in as ". $username ."And this will continue the echo until you add another"

?>
 
Status
Not open for further replies.

Users who are viewing this thread

Top