setting the same value to multiple variables
| From: | charles stuart | Date: | Fri, 31 Mar 2006 06:56:19 +0000 |
| Subject: | setting the same value to multiple variables | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-232982@lists.php.net to get a copy of this message | ||
Hi,
I'm sure this is quite basic. Nonetheless I'm new to PHP so I haven't figured it out.
I'd like to set each variable to the same value (without having to set that value individually for each variable).
Thanks for the help.
best,
Charles
if ( 1 == 1 )
{
$goodToGo = 0; $errorArray[] = "You must declare some goals on Activity 1.";
// this block of code does not set each variable to "class=\"errorHere\"";
$readingGoalsEnjoymentLabelClass &&
$readingGoalsInformationLabelClass &&
$readingGoalsAlphabeticLabelClass &&
$readingGoalsPrintLabelClass &&
$readingGoalsPhonologicalLabelClass &&
$readingGoalsPhoneticLabelClass &&
$readingGoalsComprehensionLabelClass &&
$readingGoalsVocabularyLabelClass &&
$readingGoalsInstructionsLabelClass &&
$readingGoalsCriticalLabelClass &&
$readingGoalsCommunicateLabelClass = "class=\"errorHere\"";
}