Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #5095
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Date | Sat, 03 Mar 2012 15:10:24 +0100 |
| From | Luuk <luuk@invalid.lan> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 |
| MIME-Version | 1.0 |
| Newsgroups | comp.lang.php |
| Subject | Re: which command to use |
| References | <bptmgwk9u3pe$.1ttilre2f60au$.dlg@40tude.net> <4F5223CE.7080408@invalid.lan> |
| In-Reply-To | <4F5223CE.7080408@invalid.lan> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| Message-ID | <4bl929-563.ln1@luuk.invalid.lan> (permalink) |
| Lines | 23 |
| NNTP-Posting-Host | 2001:980:9089:1:64a0:29d5:7037:ce22 |
| X-Trace | 1330784101 news.xs4all.nl 6958 [2001:980:9089:1:64a0:29d5:7037:ce22]:39685 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.php:5095 |
Show key headers only | View raw
On 03-03-2012 14:59, Luuk wrote:
> On 03-03-2012 14:26, richard wrote:
>> I have a page with nested <ul>'s.
>> I want the script to tell me how many there are.
>> so what command or function would I use?
>
> +
or:
$file = file_get_contents('test.php');
echo substr_count($file, '<ul>');
or, start Googling for:
"I want a php script to tell me how many occurences of a string there
are in a file"
but leave out the unimportant parts of the question like:
" I want" and "to tell me"
so, Google for:
"php script how many occurences of a string there are in a file"
the first occurance is the RTFM of the *substr_count* function.
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
which command to use richard <member@newsguy.com> - 2012-03-03 08:26 -0500
Re: which command to use Luuk <luuk@invalid.lan> - 2012-03-03 14:59 +0100
Re: which command to use Luuk <luuk@invalid.lan> - 2012-03-03 15:10 +0100
Re: which command to use Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-03 09:08 -0500
Re: which command to use "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2012-03-03 14:56 +0000
Re: which command to use richard <member@newsguy.com> - 2012-03-03 11:39 -0500
Re: which command to use "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2012-03-03 17:25 +0000
Re: which command to use Evan Platt <evan@theobvious.espphotography.com.invalid> - 2012-03-03 16:47 -0800
Re: which command to use Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-03-05 10:24 +0100
Re: which command to use Gregor Kofler <usenet@gregorkofler.com> - 2012-03-05 10:43 +0100
Re: which command to use Evan Platt <evan@theobvious.espphotography.com.invalid> - 2012-03-05 06:41 -0800
Re: which command to use Evan Platt <evan@theobvious.espphotography.com.invalid> - 2012-03-08 22:18 -0800
Re: which command to use "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-03-05 10:02 +0100
csiph-web