₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,503 members, 8,422,347 topics. Date: Monday, 08 June 2026 at 07:43 AM

Toggle theme

Php Quiz: And A Short Array Issue :: Copy Array Values Into Key - Webmasters - Nairaland

Nairaland ForumScience/TechnologyWebmastersPhp Quiz: And A Short Array Issue :: Copy Array Values Into Key (1284 Views)

1 Reply

Php Quiz: And A Short Array Issue :: Copy Array Values Into Key by Nobody: 5:53pm On Jul 27, 2011
I have an array that looks like this:

<?php
$babes=Array(0=>"Chichi",1=>"Chika",2=>"Chiamaka"wink;
?>
I want to convert it into:

$babes=Array("Chichi"=>"Chichi","Chika"=>"Chika","Chiamaka"=>"Chiamaka"wink;

What is the fastest way to do that? Note that the following commands are unacceptable:
- Foreach, while or other loops
- Array_keys / Array_Values
- Array_Flip - (why will you wanna flip the babes)
1 Reply

Why A Blogger Should Never Copy And PasteWhy Does This Mysql Query Display "array" Instead Of The ResultGetting The First Character Of Array Values, Php ?234

Reseller Web Hosting.Syskay's Outage: Some Tips For Those Affected.Learn Php From Novice To Pro Like A Boss