Bug #78205 [Opn->Nab]: echo is not working
| From: | requinix@php.net | Date: | Tue, 25 Jun 2019 10:13:41 +0000 |
| Subject: | Bug #78205 [Opn->Nab]: echo is not working | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-221478@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78205&edit=1
ID: 78205
Updated by: requinix@php.net
Reported by: manojneed at gmail dot com
Summary: echo is not working
-Status: Open
+Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: window7
PHP Version: 7.1Git-2019-06-25 (Git)
Block user comment: N
Private report: N
New Comment:
The second is using a non-breaking space. https://en.wikipedia.org/wiki/Non-breaking_space
Replace the
echo " ";
with
echo " ";
Previous Comments:
------------------------------------------------------------------------
[2019-06-25 10:06:35] manojneed at gmail dot com
Description:
------------
Hi,
using PHP Version 7.1.12 when i am tring to printing Pattern
like
*
* *
* * *
* * * *
* * * * *
my code
<?php
for($i=1;$i<=5;$i++){
for($k=5;$k>$i;$k--){
echo " ";
//echo "Â ";
}
for($j=1;$j<=$i;$j++){
echo "*" ;
}
print "<br/>";
}
?>
in the second loop my first echo giving me output like
*
**
***
****
*****
which is not as expected
when i go with second echo code below
for($i=1;$i<=5;$i++){
for($k=5;$k>$i;$k--){
//echo " ";
echo "Â ";
}
for($j=1;$j<=$i;$j++){
echo "*" ;
}
print "<br/>";
}
?>
i get my desired output like
*
**
***
****
*****
strange both echo syntax is same why first echo not working.please help me
Test script:
---------------
*
**
***
****
*****
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78205&edit=1