|
Re: which command to use [message #177276 is a reply to message #177274] |
Sat, 03 March 2012 13:59 |
Luuk
Messages: 329 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
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?
+
|
|
|
Re: which command to use [message #177278 is a reply to message #177274] |
Sat, 03 March 2012 14:08 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
On 3/3/2012 8:26 AM, 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?
Fido, count!
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|
Re: which command to use [message #177279 is a reply to message #177276] |
Sat, 03 March 2012 14:10 |
Luuk
Messages: 329 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
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.
|
|
|
Re: which command to use [message #177280 is a reply to message #177274] |
Sat, 03 March 2012 14:56 |
Beauregard T. Shagnas
Messages: 154 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
richard the sto0pid 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?
Naturally, you want to know how many <ul> there are in the generated
HTML, of course. That would be the "page." <ul> in a script can/could be
generated within a loop, with just one <ul> actually existing in the
script. (something else from dynamicdrive, I'll wager)
Drop your HTML output into any competent text editor and use the Find
function, usually Control-F. Sometimes, even the browser can tell you!!
--
-bts
-This space for rent, but the price is high
|
|
|
Re: which command to use [message #177283 is a reply to message #177280] |
Sat, 03 March 2012 16:39 |
|
richard
Messages: 213 Registered: June 2013
Karma: 0
|
Senior Member |
|
|
On Sat, 3 Mar 2012 14:56:54 +0000 (UTC), Beauregard T. Shagnasty wrote:
> richard the sto0pid 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?
>
> Naturally, you want to know how many <ul> there are in the generated
> HTML, of course. That would be the "page." <ul> in a script can/could be
> generated within a loop, with just one <ul> actually existing in the
> script. (something else from dynamicdrive, I'll wager)
>
> Drop your HTML output into any competent text editor and use the Find
> function, usually Control-F. Sometimes, even the browser can tell you!!
I'm not looking to see how many ul's are on a page for a personal
referencce. But rather, as a need for the rest of the script to know how
many items must be in an array.
As the basis for building a tree style menu.
While you may consider dynamicdrive a joke, at least they help.
I had a question about a script and they answered with the proper answer
without any bullshit like you give.
www.1littleworld.net/sample
All done with script provided by dynamicdrive and the lightbox script was
from elsewhere. With a modification made by a guy so that the script would
work as I wanted.
Before you go mouthing off about the errors, those are in the javascript,
not the html.
|
|
|
Re: which command to use [message #177284 is a reply to message #177283] |
Sat, 03 March 2012 17:25 |
Beauregard T. Shagnas
Messages: 154 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
richard the sto0pid wrote:
> Beauregard T. Shagnasty wrote:
>> richard the sto0pid 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?
>>
>> Naturally, you want to know how many <ul> there are in the generated
>> HTML, of course. That would be the "page." <ul> in a script can/could
>> be generated within a loop, with just one <ul> actually existing in the
>> script. (something else from dynamicdrive, I'll wager)
>>
>> Drop your HTML output into any competent text editor and use the Find
>> function, usually Control-F. Sometimes, even the browser can tell you!!
>
> I'm not looking to see how many ul's are on a page for a personal
> referencce. But rather, as a need for the rest of the script to know how
> many items must be in an array.
> As the basis for building a tree style menu.
There are two <ul> on your /sample page.
> While you may consider dynamicdrive a joke, at least they help. I had a
> question about a script and they answered with the proper answer without
> any bullshit like you give.
>
> www.1littleworld.net/sample
Yup. two of 'em.
> All done with script provided by dynamicdrive and the lightbox script
> was from elsewhere. With a modification made by a guy so that the script
> would work as I wanted.
Have you ever tried to write a script on your own?
> Before you go mouthing off about the errors, those are in the
> javascript, not the html.
Are you inviting an error report? Some of them would go away if you
would use HTML 4.01 instead of XHTML (which is a dead no-future doctype).
There are also several errors in your CSS.
Why are you asking about JavaScripts in a PHP group?
--
-bts
-This space for rent, but the price is high
|
|
|
|
|
Re: which command to use [message #177293 is a reply to message #177283] |
Mon, 05 March 2012 09:24 |
Erwin Moller
Messages: 228 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
On 3/3/2012 5:39 PM, richard wrote:
> On Sat, 3 Mar 2012 14:56:54 +0000 (UTC), Beauregard T. Shagnasty wrote:
>
>> richard the sto0pid 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?
>>
>> Naturally, you want to know how many<ul> there are in the generated
>> HTML, of course. That would be the "page."<ul> in a script can/could be
>> generated within a loop, with just one<ul> actually existing in the
>> script. (something else from dynamicdrive, I'll wager)
>>
>> Drop your HTML output into any competent text editor and use the Find
>> function, usually Control-F. Sometimes, even the browser can tell you!!
>
> I'm not looking to see how many ul's are on a page for a personal
> referencce. But rather, as a need for the rest of the script to know how
> many items must be in an array.
> As the basis for building a tree style menu.
>
> While you may consider dynamicdrive a joke, at least they help.
> I had a question about a script and they answered with the proper answer
> without any bullshit like you give.
>
Richard,
I fail to see why you respond so unfriendly ("bullshit like you give")
to Beauregard T. Shagnasty.
Maybe you had some problems with him before, but the answer he gave gave
you in this thread is correct and helpful.
I don't imagine I am the police in here, but I just want to warn you
that behaving aggressive will only result in your disadvantage: people
won't be inclined to help.
Just saying...
Regards,
Erwin Moller
--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens
|
|
|
Re: which command to use [message #177294 is a reply to message #177293] |
Mon, 05 March 2012 09:43 |
Gregor Kofler
Messages: 69 Registered: September 2010
Karma: 0
|
Member |
|
|
Am 2012-03-05 10:24, Erwin Moller meinte:
> Richard,
>
> I fail to see why you respond so unfriendly ("bullshit like you give")
> to Beauregard T. Shagnasty.
> Maybe you had some problems with him before, but the answer he gave gave
> you in this thread is correct and helpful.
>
> I don't imagine I am the police in here, but I just want to warn you
> that behaving aggressive will only result in your disadvantage: people
> won't be inclined to help.
> Just saying...
richard is a moron. Search this group. He frequently pops up with some
inane question and gets personal both when people try to help or tell
him (politely) to do his homework (and/or bugger off).
Gregor
|
|
|
Re: which command to use [message #177296 is a reply to message #177293] |
Mon, 05 March 2012 14:41 |
Evan Platt
Messages: 124 Registered: November 2010
Karma: 0
|
Senior Member |
|
|
On Mon, 05 Mar 2012 10:24:05 +0100, Erwin Moller
<erwinmollerusenet(at)xs4all(dot)nl> wrote:
> Richard,
>
> I fail to see why you respond so unfriendly ("bullshit like you give")
> to Beauregard T. Shagnasty.
> Maybe you had some problems with him before, but the answer he gave gave
> you in this thread is correct and helpful.
That's typical of a response from richard. Expect nothing less.
--
To reply via e-mail, remove The Obvious and .invalid from my e-mail address.
|
|
|
Re: which command to use [message #177319 is a reply to message #177293] |
Fri, 09 March 2012 06:18 |
Evan Platt
Messages: 124 Registered: November 2010
Karma: 0
|
Senior Member |
|
|
On Mon, 05 Mar 2012 10:24:05 +0100, Erwin Moller
<erwinmollerusenet(at)xs4all(dot)nl> wrote:
> Richard,
>
> I fail to see why you respond so unfriendly ("bullshit like you give")
> to Beauregard T. Shagnasty.
> Maybe you had some problems with him before, but the answer he gave gave
> you in this thread is correct and helpful.
That's typical of a response from richard. Expect nothing less.
--
To reply via e-mail, remove The Obvious and .invalid from my e-mail address.
|
|
|