write while loop in php function and pass parameter code example Example: while in php <?php echo 'nice'; ?>