Find Jobs
Hire Freelancers

Categories and Sub-Categories (for rmash)

$100-300 USD

Завершено
Опублікований over 16 years ago

$100-300 USD

Оплачується при отриманні
FOR R.M. ASH ONLY. NO OTHER BIDS ACCEPTED. I have a table in a DB that contains the name of some "categories" that some items will be listed in. Each category can have an unlimited number of sub-categories, each of which can in turn have an unlimited depth of sub-categories below it. This is where the function comes in, so that the one function can call a new instance of itself recursively to the bottom of each sub-sub-sub-category. The table has just a few values: cat_id, name Description, SubCatOf, sort_val The "cat_id" is the primary key and is just the ID number of the category. "name" is self-explanatory as is "description." The "sort_val" is the sorted "weight" of the category sorted ASC. The key to the problem is "SubCatOf" which is "0" for a top-level category, or equals the "cat_id" of whatever "parent category" it is directly under. This parent could be the child of another category, and so forth. I should be able to pass a variable to the function to define the format of the output, as one of the following values: format='list' --> should output as an unordered list <ul><li></li></ul> format='dasharray' --> will be used to make a dropdown list and should indent with a "-" sub-categories and store the "cat_id" with it in an array array[]=("cat_id" => $cat_id, "displayname" => "- $name") or if further down, more dashes like this array[]=("cat_id" => $cat_id, "displayname" => "- - - - $name") so that it can be outputted as such (the code to do this would be helpful as well, though I suppose I can write my own foreach to handle it if you don't have time): <select name="SelectCategory" size="1"> <option value="1">Pets</option> <option value="4">- Dogs</option> <option value="7">- - Labrador</option> <option value="8">- - Poodle</option> <option value="5">- Cats</option> <option value="6">- - Siamese</option> <option value="2">Zoo Animals</option> <option value="3">- Giraffe</option> <option value="9">- Zebra</option> </select> format='orderedarray' --> same as above, but should just be an array in order containing all the original values (cat_id, name, description, sort_val, SubCatOf) I suppose it might be easier to make a function that makes the last format above (orderedarray) first, and then run that array through a specific function for each formatting...that is fine too. ( + other requirements as needed and already discussed) FOR R.M. ASH ONLY. NO OTHER BIDS ACCEPTED.
ID проекту: 192471

Про проект

5 пропозицій(-ї)
Дистанційний проект
Активність 16 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
Доручений:
Аватарка користувача
As discussed
$120 USD за 7 дні(-в)
5,0 (149 відгуки(-ів))
6,8
6,8
5 фрілансерів(-и) готові виконати цю роботу у середньому за $138 USD
Аватарка користувача
Can be done very easily by our experts. Please check PMB for details
$100 USD за 1 день
4,8 (152 відгуки(-ів))
7,4
7,4
Аватарка користувача
Hello, This is a placeholder bid. Please see PMB for more details.
$150 USD за 7 дні(-в)
5,0 (1 відгук)
3,0
3,0

Про клієнта

Прапор UNITED STATES
Houston, United States
5,0
41
Спосіб оплати верифіковано
На сайті з квіт. 22, 2005

Верифікація клієнта

Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.