Problem Setting property of a Class In Zend Studio

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Hano1989
Forum Newbie
Posts: 1
Joined: Tue Aug 10, 2010 1:49 pm

Problem Setting property of a Class In Zend Studio

Post by Hano1989 »

Hi to all....im trying to set the property of my class as follows:
<?php
class Person
{
var $first_name;
var $last_name;

function Display()
{
echo "{$this->first_name} {$this->last_name}";
}
}

$p = new Person();
$p->first_name = 'Haroon';
$p->last_name = 'Niazi';
$p->Display();
?>

when i save this code to a php file on a notepad and run it on my localhost it works perfectly fine.. but when i do the some coding in my zend studio it does not update the value of the attributes of the first and last name of my class....please help!!!!
User avatar
PHPHorizons
Forum Contributor
Posts: 175
Joined: Mon Sep 14, 2009 11:38 pm

Re: Problem Setting property of a Class In Zend Studio

Post by PHPHorizons »

Which version of Zend Studio?

I tested the code in Zend Studio 5.5.1 and it worked 100%.
Post Reply