Questions tagged as 'echo'

1
answer

How to send message to stderr in bash via echo command?

I'm writing some script to deploy an application and I need to send status messages to stderr instead of stdout , which the echo command does by default. How to do the command echo send the message to stderr instead of stdout ?...
asked by 12.11.2014 / 21:32
2
answers

How do I put an html tag inside the php code to format the text there?

I have the following code and wanted to put the <font> </font> tag for example to format the user. <?php session_start(); echo "Usuario: ". $_SESSION['usuarioNome']; ?>     
asked by 17.06.2017 / 12:16
3
answers

In PHP, what is the best way to print a variable through a function?

Let's say I have the following function: private function teste() { return 'teste'; } For me to print on the screen, I could simply use: echo $this->teste(); But in some cases I see that they first assign to a variable and only...
asked by 08.09.2015 / 04:55
1
answer

Doubt about the echo within a loop

I have this code for an API test and I wanted every loop end to write it on the script progress screen in%, but it only shows when it finishes doing everything, is there any way to make it work? . <?php require __DIR__ . '/vendor/autoload.p...
asked by 20.01.2018 / 03:29
1
answer

php echo of html tag as text

I have a query in php / oracle that hides a "" tag while displaying the result in the browser while in oracle sql developer displays everything ok. Expected: '
asked by 25.11.2015 / 15:09
1
answer

Error printing echo php into div

I am an amateur programmer and I have a problem printing a php echo inside a div. I have a file that, when accessed (one time only) will start the installation of the database: mysqli_report(MYSQLI_REPORT_STRICT); try { $mysqli = new...
asked by 01.03.2015 / 15:56
2
answers

Update the echo on a page every minute

I'm displaying the time in the user pane with the code: <?php date_default_timezone_set('America/Sao_Paulo'); $date = date('d-m-Y H:i'); ?> Using the echo command: <?php require("includes/serverTime.php"); echo "<div class...
asked by 14.04.2016 / 00:53
2
answers

Echo colored in php

How can you leave ECHO in PHP colorful? Print in HTML, colorful letter-by-letter ex: if (strpos($d5, '{"name":"')) { echo 'LIVE ->' . $a . '|' . $b . ' | C:' . $c . ''; } else { echo "DEAD -> $a|$b "; } All that gives LIVE an...
asked by 24.12.2017 / 03:27
1
answer

Convert date format into echo of php [duplicate]

Good afternoon, My database is saving dates in the following format "2017-04-19", I do not know if I can change the data already registered in it and the way the data will be saved, so I chose to treat the date in my php code , which I have...
asked by 19.04.2017 / 21:28
1
answer

document.getElementsByClassName ("x"). innerText is not working

I'm trying to use document.getElementsByClassName().innerText but it does not replace the text contained in the class. This text comes from an echo php: echo "<div class=\"life\">$life/$maxlife</div>"; getting in the...
asked by 02.06.2016 / 15:48