php script in bash loop
<p>I'm a beginner bash coder, and have a PHP script; in each run it returns 0 or 1 and I need a bash script that runs this PHP script until it returns 1. </p>

<p>PHP script:</p>

<pre><code>/* sample code */
echo $number;
</code></pre>

<p>Bash script:</p>

<pre><code>#!/bin/bash    
output=`php /var/www/site/script.php`
while [$output == 1]
do
output=`php /var/www/site/script.php`
done
</code></pre>

<p>The PHP script is working, but the bash script doesn't work</p>

<p>Bash returns</p>

<pre><code>$ bash /root/loop.sh
/root/loop.sh: line 6: syntax error near unexpected token `done'
</code></pre>