answersLogoWhite

0

If I got your question correctly, you want multiple statements to be executed using if-else statement. Here goes the code for it

if($x>0)

{

// multiple statments here

// As long as statements are in curly bracket

// All of them would execute

// before the if statement finishes

}

else

{

// same way put all your multiple statements

// in curly brackets. All of them would execute

// using a single if-else statement

}

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

The statement can cause other statements to execute under certain conditions?

Selection statement: if, switch/case, ternary conditional operator.


What is another word for statements seemingly true but false?

A false statement is a lie, an untruth, or dishonesty. A false statement under oath is perjury.


What is a unconsolidated balance sheet?

When there is parent subsidiary relationship exists and in that case if separate financial statements are prepared by both parent and subsidiary company those statements are called unconsolidated statements.


Where is i reported in the financial statements?

Need more clarification: i = interest? (if expense: shown in income statement, under expenses. if revenue: shown in income statement, under revenues) i = investment? (is an asset, showin in the asset section of the balance sheet) i = income? ( shown in the income statement)


What kind of a statement is a statutory declaration?

A statutory declaration is a legal document that is defined under the law of certain Commonwealth nations, this declaration is similar to statements made under oath.


Where is the amount of merchandise inventory disclosed in the financial statements?

Amount of merchandise inventory is disclosed at the bottom of the financial statement under balance sheet.


Should you write a police statement if being accused of assault?

Under the situation, you probably won't be required to actually write any statements. The officer will take your statement and possibly ask you to sign it. That's all.


Where does unearned service revenue go on a multiple step income statement?

unearned service revenue is on the balance sheet not the income statement so the answer is nowhere. service revenue is on the income statement under revenues.


How do you show sales discount in financial statements?

Sales discount is shown under income statement as a deduction from sales because it reduces the actual sales figure.


Where are selling and administrative expenses found on the multiple-step income statement?

Selling and administration expenses are found under income statement after gross profit section and for the calculation of net profit


What statement BEST reflects how to protect yourself i a convoy under combat conditions?

In order to answer this question I would need to see the statements to let you know which statement was the best one. Please resubmit your question with the statements or make a good educated guess which one is the BEST statement. You can read about convoys during world war 2 on the link below. Thanks for using answers com and wikianswers.


Why is there a need to create the function in a program?

There are many reasons, One simple reason, is that functions group a certain sequence of code statements under one function name. So that if you need to run these set of code statements multiple times and at various occasions, instead of copy/pasting that whole set at various places in your source code, you can simply call the function using its name.