Returning array()

Ask about general coding issues or problems here.

Moderators: macek, egami, 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

Returning array()

Post by Pakcik_Kantin » 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

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

Re: Returning array()

Post by WiZARD » 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();

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

Ok

Post by Pakcik_Kantin » Tue Jan 21, 2003 10:10 pm

TQ.

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

Re: Ok

Post by WiZARD » Wed Jan 22, 2003 9:06 am

Pakcik_Kantin wrote:TQ.

What do you mean?

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

TQ

Post by sarjanajava » Sun Jan 26, 2003 10:01 am

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

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

Post Reply

Who is online

Users browsing this forum: phpnoob and 1 guest