|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-06 07:53 UTC] derick@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 15:00:01 2025 UTC |
Description: ------------ I wanted to read all the files from a directory and split them in diferent variables. ./configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql=/usr/local/mysql' '--with-pgsql=/usr/local/pgsql/' Reproduce code: --------------- <?php $ali = `ls`; $oficial = explode(" ", $ali); echo "oficial[0]<br>"; echo "oficial[1]<br>"; echo "oficial[2]<br>"; echo "oficial[3]"; ?> Expected result: ---------------- I would expect to see the files in the directory listed one below the other. Actual result: -------------- I am seeing all the files in one line.... not in diferent lines. Only $oficial[0] is listed, the rest of variables are empty