Re: 2 questions: Search in array and detect JS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Stut,
Thanks for replying.

-------------------


The way I do this is to serve the 'notmal page' first, but with the
following snippet of JS in it...

<script language="javascript">
<!--
     location.href = '/url/for/ajax/page.php';
-->
</script>----------------------Makes sense and pretty easy, this was
suggested a while back, since you have supported itI think I'll start using
this method.------------------- You should be able to craft some combination
of array_walk and a custom
function that checks each element with stristr to do what you need.
-------------Actually, I solved this thanks to Richard from the list who
suggested strpos, a function I had never usedbefore ( Tedd from the list
gave me the same suggestion as you to use stristr, I didnt want to use
stristr as its a bit expensive esp with a really large array) the problem I
ran into was that strpos is a php5 function....but reading the user
contributed articles on strpos at thephp site I got the code that does
exactly that in 2-3 linesCheers!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux