Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.php Subject: Re: Regarding split text and match from data base Date: Fri, 22 Nov 2013 16:34:24 +0100 Lines: 31 Message-ID: <528F7980.4040500@arnowelzel.de> References: <676203c7-7d21-4513-92d5-7a9111c2eaa6@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net h6+uRkVdZVU8LtaVbbXtLAbUQFQOd2rD8RL8hzuA5pwPGiutbM Cancel-Lock: sha1:FjXMW05/QqCoSK2t6ubsjMJrnDA= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 In-Reply-To: <676203c7-7d21-4513-92d5-7a9111c2eaa6@googlegroups.com> Xref: csiph.com comp.lang.php:11925 Am 22.11.2013 12:28, schrieb jalaf28@gmail.com: > Hello All I just start learning PHP and i am using 5.4.16 i just > want to split the out put of the following and match from the > database and print the System name. > > here is the Code > > > ob_start(); $line=shell_exec("arp -a"); echo "
; echo $line; echo
> "
"; > > ?> > > It shows the output of the command "arp -a" and show the Ip address > and Mac address on the LAN system. i saved the name and the Mac > address in the database. now i want to extaxct the command output and > match ["MAc address] with database and show the Particular system > name and Ip Address. i try google but not sufficent. You can try explode() using space (' ') as delimiter, see: -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de