Search question

tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Re: Search question

Post by tubeman »

Hi,
I can store <!--SEARCH_QUERY--> in $somearray[] but how do I output random number to display between 25-50 queries on the page?
admin
Site Admin
Posts: 37233
Joined: Wed Sep 10, 2008 11:43 am

Re: Search question

Post by admin »

google: "php how to output random number of elemenmts from an array"
I'm 100% sure there gonna be a lot of examples
Don't forget to run script update
tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Re: Search question

Post by tubeman »

Hi,
I tried this but it didn't work:

<thumb search_log=all num=1-<?php int $numb = mt_rand(15, 50); echo $numb;?>>

Any idea how to make it work?
admin
Site Admin
Posts: 37233
Joined: Wed Sep 10, 2008 11:43 am

Re: Search question

Post by admin »

no
you need to take a look art my example like

<thumb num=1-50>
<?php
$somearray[] = 'gallery data';
?>
</thumb>

and then outpur random number of elements from $somearray
Don't forget to run script update
tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Re: Search question

Post by tubeman »

I have been trying but its complicated as I have <!--SEARCH_QUERY--> and <!--ESCAPED_SEARCH_QUERY--> to output as well. I'm not very good at php coding.
admin
Site Admin
Posts: 37233
Joined: Wed Sep 10, 2008 11:43 am

Re: Search question

Post by admin »

i don't have a ready made coed for your situation
As usual there are 2 options:

1. free - read about php and code it
2. pay for the work and somebody will do it for you
Don't forget to run script update
Post Reply