[Typo3-dev] PHP syntax

Søren Vedel sv at workhouse.dk
Sun Sep 4 15:01:29 CEST 2005


Good morning developers,

I have made an extention with a dropdown-box and two choices.

Now I want to assign the correct values to display in FE and not the 
numbers 0 and 1.

Here goes my code:

// Gives the correct values to the 'type':
	if ($this->getFieldContent("type")=0) { $this->getFieldContent("type") 
=> "The first value"
};
	if ($this->getFieldContent("type")=1) {
($this->getFieldContent("type") => "The second value")
};

but I get a parse error, unexpected '=' and I am very new to PHP syntax.

Any suggestions?

- Søren




More information about the TYPO3-dev mailing list