Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,155,409 members, 7,826,582 topics. Date: Monday, 13 May 2024 at 04:36 PM

Kwestc's Posts

Nairaland Forum / Kwestc's Profile / Kwestc's Posts

(1) (of 1 pages)

Programming / Re: Array Of Countries And Cities In Php by Kwestc: 11:47pm On Nov 25, 2012
I think this should help

<?php

$state = "Abuja,Anambra,Enugu,Akwa Ibom,Adamawa,Abia,Bauchi,Bayelsa,Benue,Borno,Cross River,Delta,Ebonyi,Edo,Ekiti,Gombe,Imo,Jigawa,Kaduna,Kano,Katsina,Kebbi,Kogi,Kwara,Lagos,Nasarawa,Niger,Ogun,Ondo,Osun,Oyo,Plateau,Rivers,Sokoto,Taraba,Yobe,Zamfara"


$city = "Aba,Abakaliki,Abeokuta,Abuja,Akure,Asaba,Anambra,Atlanta,Awka,Bauchi,Benin City,Birnin Kebbi,Calabar,Dutse,Eket,Enugu,Gombe,Gusau,Ibadan,Ife,Ikeja,Ikot-Abasi,Ikot Ekpene,Ikoyi,Ilorin,Jalingo,Jimeta,Jos,Kaduna,Kano,Katsina,Karu,Kumariya,Lafia,Lagos,Lokoja,Maiduguri,Makurdi,Minna,Nsukka,Ogbomoso,Onitsha,Oron,Oshogbo,Owerri,Owo,Oyo,Port Harcourt,Potiskum,Sokoto,Suleja,Umuahia,Uyo,Warri,Wukari,Yenagoa,Yola,Zaria";


/*
Function to format an array into a <select> tag

@param: $arr - The array to be converted.
@param: $field - The attribute name of the <select> tag

Usage: <form>
...
...
FormatSelect( $state, "State" );
...
FormatSelect( $city, "City" );
...
</form>

Prototype: String FormatSelect( Array $arr, String $field )
*/

function FormatSelect( $arr, $field ) {

$options = explode( ",", $arr );

$selectTag = '<select name="' .$field. '">';

foreach( $options as $key => $option ) {

$selectTag .= '<option value="'.$option.'">'. $option .'</option>' . "\n";
}

$selectTag .= '</select>';

return $selectTag;

}

?>
Programming / Re: [C++ Open Source] Relax! ( File Management Tool) by Kwestc: 10:31pm On Nov 25, 2012
I have tried your program, I think it is interesting. But you can make it more interesting by:

1. Adding a listener to any registered folder.
2. Let the program run as a system service.
3. Try reduce the overall program size (7.523 MB) is much for this current feature. Eliminate any dll that is not useful for now (If using other language is not an option).

Thanks, keep making Nigeria proud.

Seun (where is omotodun? I 've really miss him).
Programming / Re: Community Project(strictly Java) by Kwestc: 3:08pm On Jan 12, 2012
Coming in as a tester
That will do for intermediate programmer
But I hope it sees the light of the day

(1) (of 1 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 8
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.