Returning array()

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
Pakcik_Kantin
New php-forum User
New php-forum User
Posts: 12
Joined: Sun Jan 19, 2003 8:35 pm
Location: Canteen

Sun Jan 19, 2003 8:40 pm

function myarr()
{
return array(1,2,3);
}

$saya=myarr();

IS THIS OK. and how can I return an array
Image

User avatar
WiZARD
Moderator
Moderator
Posts: 1240
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Mon Jan 20, 2003 8:23 am

Try this:

Code: Select all

function myarr()
{
$array_set_to = array(1,2,3);
  return $array_set_to;
}

$saya=myarr();
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";
Image

Pakcik_Kantin
New php-forum User
New php-forum User
Posts: 12
Joined: Sun Jan 19, 2003 8:35 pm
Location: Canteen

Tue Jan 21, 2003 10:10 pm

TQ.
Image

User avatar
WiZARD
Moderator
Moderator
Posts: 1240
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Wed Jan 22, 2003 9:06 am

Pakcik_Kantin wrote:TQ.

What do you mean?
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";
Image

User avatar
sarjanajava
New php-forum User
New php-forum User
Posts: 39
Joined: Wed Nov 27, 2002 10:59 pm
Contact:

Sun Jan 26, 2003 10:01 am

[code]
<?php
$TQ="tHANK YOU";
print ("$TQ");
?>

-----------------------------
PakCik Kanteen. Kanteen sekolah ka kantin php?

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests