I just created a class with multidimensional array in it, please look below,
Code: Select all
<?php
//scraping class
class casting
{
public $jobs = array("casting_id" => array(
"job_id" => 0,
"listed_on" => '',
"expiration" => '',
"location" => '',
"gender" => '',
"age" => '',
"categories" => '',
"union" => '',
"rate" => '',
"email" => '',
"description" => ''));
function __construct() {
}
function __destruct() {
}
function setJobs($casting_id, $job_id, $listed_on, $expiration, $location, $gender, $age, $categories, $union, $rate, $email, $description) {
$this->jobs[]['job_id'] = $casting_id;
$this->jobs[]['listed_on'] = $job_id;
$this->jobs[]['listed_on'] = $listed_on;
$this->jobs[]['expiration'] = $expiration;
$this->jobs[]['location'] = $expiration;
$this->jobs[]['']['gender'] = $gender;
$this->jobs[]['age'] = $age;
$this->jobs[]['categories'] = $categories;
$this->jobs[]['union'] = $union;
$this->jobs[]['rate'] = $rate;
$this->jobs[]['email'] = $email;
$this->jobs[]['description'] = $description;
}
function setJobs($casting_id, $job_id, $listed_on, $expiration, $location, $gender, $age, $categories, $union, $rate, $email, $description) {
return $this->jobs[]['job_id'];
return $this->jobs[]['listed_on'];
return $this->jobs[]['listed_on'];
return $this->jobs[]['expiration'];
return $this->jobs[]['location'];
return $this->jobs[]['']['gender'];
return $this->jobs[]['age'] = $age;
return $this->jobs[]['categories'];
return $this->jobs[]['union'];
return $this->jobs[]['rate'];
return $this->jobs[]['email'];
return $this->jobs[]['description'];
}
}
$newcasting = new casting();
?>
Please note the array is two dimensional, i used the array for temporary replacement for mysql.
Can you check those please, thanks in advance.
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: