Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~3K People Reached
Favorite Forums
Favorite Tags
Member Avatar for mjsmitten

I build a code to eventually get a random item per category. Functions are working. I am just curious if the WHILE and IF are accurate. I am not sure if the first two unset() is good or do I need to drop those? And more important WHY the random …

Member Avatar for diafol
0
139
Member Avatar for mjsmitten

Is it possible to make a while loop for a function but in stead of just echo it's result, store it in an array??? values in database for example: one, two, three, four. In a normal way I do: While (havenumbers()) { echo havenumber(); // displays "one" etc. } In …

Member Avatar for paulkd
0
124
Member Avatar for mjsmitten

I have a question about using variables inside a function. The first part of code is not working. It appears that the variable '$myvalue' is not being served to the function although when I echo the $myvalue it has the right text. If I however use normal text, it WORKS! …

Member Avatar for IIM
0
161
Member Avatar for mjsmitten

There is something wrong with this foreach. The last value from $myregions is not picked up but has again the second value 'georgia': <?php $myregions = array('florida','georgia','delaware'); foreach ($myregions as $value) { myfunction(array('region'=>$value)) ; if(count_items()>1) { if(has_items()){ draw_item($class); } } } ?>

Member Avatar for mjsmitten
0
137
Member Avatar for mjsmitten

I have an array('one','two','three'); I want to query one time, for one result. First query using the first array value, the second query with the second array value, the third query using the third array value. Do I have to use some kinda counter to loop through the array values? …

Member Avatar for diafol
0
132
Member Avatar for mjsmitten

The program I use takes items out of a database per query. <?php myquery(array('region'=>'florida','region'=>'florida','region'=>'florida'));?> I have regions per example (florida, georgia, delaware, etc.). After the query it return: more items from one state then the other; nothing; or just one (depending on what users are posting). Now I would only …

Member Avatar for mjsmitten
0
201
Member Avatar for mjsmitten

My url's look like this //classifieds/search/region,something/ I want it to rewrite to //classifieds/state/something/ note: If i look at the url in the browser the words after "classifieds" are greyed. my .htacces has this: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule …

Member Avatar for LastMitch
0
152
Member Avatar for mjsmitten

My software is using the following function to build the input field for in this case... input field name is Title: <label for="Title"</label> <?php ItemForm::title_input();?> I do not know where it come from among the hundreds of files. All I want is to target this fields to set a maxlength. …

Member Avatar for minitauros
0
143
Member Avatar for mjsmitten

If I have a array: $myarray = array("10"=>"apple", "20"=>"banana", etc..) up to 15 values. and I use $_GET['category'] to get my value from url for instance "10" How do I echo $myarray to be "apple"?

Member Avatar for paulkd
0
171
Member Avatar for mjsmitten

My url's are similar like this: website/search/category,Room/region,Oregon/ website/search/category,Room/ website/search/category,Room/city,Palm Bay/ website/search/city,Palm Bay/ website/search/region,Florida/ It always contains single or combination of CATEGORY CITY REGION I want to echo in an if statement, for example: if url contains "category,xxx" then echo "category is xxx". (xxx can be anything) I found this code: …

Member Avatar for diafol
0
275
Member Avatar for mjsmitten

I have some functions that returns nothing or some value (obvious), and also having a little trouble with the if and closing, is there a good way to do this? I want to return the value after checking if any of the strings are not empty. Actually it is a …

Member Avatar for diafol
0
163
Member Avatar for mjsmitten

I have the following function for resizing to (also) thumbnails, and widht and height for big, smaller and thumbs is fixed sizes, but the problem is this: If an uploaded image is small in dimensions there is a large white space around the thumb to make it a fixed size; …

Member Avatar for pritaeas
0
193
Member Avatar for mjsmitten

Hi I am really not good with javascript but I have a script that retrieves a list of state names with this code: map.objectList = new AmCharts.ObjectList("listdiv"); Apparantly it is withouth any format retrieved in a UL LI format. I need to "catch" this list (I know it has 51 …

Member Avatar for mjsmitten
0
191
Member Avatar for mjsmitten

Hello, I have urls like this: http://site/search/region,state and http://site/type/mytype I need to extract the last part and echo this. I used code below and for the first url it returns "region,state" (but I only need the last part). And what if behind the url is another character like a slash …

Member Avatar for mjsmitten
0
157
Member Avatar for mjsmitten

I have the following code. The QUERY is custom and give me results based on category. After some checks I can acces items inside that category. Using the functions posted below. If there are more items inside that category I want to retrieve a random from those results. Is it …

Member Avatar for mjsmitten
0
301
Member Avatar for mjsmitten

AFTER a query for 1 category I receive details back. 1 category can have more items. The items have sequental id's but not in normal order. While (category_items()) { echo item_id(); // checking this give me for example id 1, 3 and 5. } I want to select one random …

Member Avatar for mjsmitten
0
138
Member Avatar for mjsmitten

I have a function named **category_name()** which use in a while loop give me a different value everytime I echo it. I have another function named **query_item()** which is use in the same loop. I need to get result from first function in the second function. Can I use **call_user_func()** …

Member Avatar for pritaeas
0
123
Member Avatar for mjsmitten

I am inside a while loop. Different categories are displayed with their name and id in a list. Then I need to query each category and get a item title from there. This query is not working although the function osc_category_id/name is changing accordingly. Or am I doing it wrong? …

Member Avatar for mjsmitten
0
269