answersLogoWhite

0

displaying a variable in php using echo statement?

<?php

$name="ram"; //declaring and defining the variable

echo "$name"; //printing the variable using echo command

?>

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is one advantage of using a variable to represent a pattern?

A single statement, using variables, can convey the same information as many, sometimes infinitely many, statements.


Print 1-10 numbers using while loop?

public static void main(String args){ int counter = 0; //initialize the counter variable to 0 while (counter &lt; 10){ //while the counter variable is less than 10... counter ++; //increase the counter variable by 1 System.out.println(counter); //print the counter variable } }


How do you print a particular value using PHP?

To print a particular value in PHP you have to select which variable you wish to print. Below is an example of how this can be done. &lt;?php $var[1] = "Hello"; $var[2] = "Lalala"; print $var[2]; // prints Lalala but not Hello ?&gt;


How do you write a program using the gotoxy statement and print function to display letters of the alphabet on the computer screen?

There is no gotoxy statement in C.


Why php Echo not printing output with parenthesis?

echo will not return output when using parenthesis because echo is not a function like print. echo is a language construct. The benefit to using echo over the print function is speed, plus you can separate data types using comma's rather than periods.Example:echo 'This is a string ' , $variable , ' ending string';is the same (but faster) as:print('This is a sting' . $variable . ' ending string');


How do you display PowerPoint Presentations using PHP?

PHP is not capable of displaying PowerPoint Presentations without another language that does support the display of PowerPoint presentations.Alternatively, you may turn the PowerPoint into a video and print another language capable of displaying videos using PHP.


What is a variable used for in Python?

A variable is used to store information. As an example say you are asking someone for their favorite food, and want to store the answer in a variable called favoriteFood: favoriteFood = input("What is your favorite food?") Now if you print the value of favoriteFood (using print(FavoriteFood)) you will see that it has been saved in that variable. You can store any type in a variable, such as number, a string, or even an object.


How do you display 1 to 100 using loops in c?

To display 1 to 100 using loops in C, you must first declare a variable. This variable will be the one to be printed it's increasing values. The variable must increment by 1 every time the loop loops. While the loop counter does not exceed 100, the loop will continue. Example code: int counter = 0; int value = 0; for (counter = 0; counter &lt;= 100; counter++) { value++; // (increment) increase value of variable "value" by 1 printf("%d\n", value); }


Can you print string without using semi column in C programming?

Sure. You can write any string, containing or not-containing semicolons (or commas, full stops etc). On the other hand, you cannot write programs without statements, and you have to terminate statements with semicolon.


How do you print square using for loops?

how to print "square" using for loop


How do you solve an or problem if a variable is unrestricted in sign?

Solve the problem using the + sign for the variable. Then solve the problem using the - sign for the variable. Report your answer as the answer that you got using + or the answer that you got using -.


How do you print array variable without using array subscripts?

Well the most prolific answer to this query would be the use of pointers.Use a pointer and allocate it to the array of interest and start printing.