Question
How to access a specific character in a string?

Answers

Any character in a string can be accessed by a special string element expression:
• $string{index} - The index is the position of the character counted from left and starting from 0.
Here is a PHP script example:
$string = 'It's Friday!';
echo "The first character is $string{0}
";
echo "The first character is {$string{0}}
";
?>
This script will print:
The first character is It's Friday!{0}
The first character is I   Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q What is the use of Pivot table?
  • Q When a husband earns his livelihood from unlawful sources such as gambling, etc. or is a sinner (by drinking alcohol, etc.) Can the wife refuse to fulfil her duties towards such a husband?
  • Q Find the output for the following C program #include void main(void); int printf(const char*,...); void main(void) { inti=100,j=10,k=20; -- int sum; float ave; charmyformat[]="ave=%.2f"; sum=i+j+k; ave=sum/3.0; printf(myformat,ave); }
  • Q What would be the value of "str" of the below program? string str = "hello"; str.ToUpper().; str.Insert(0,"WORLD); what is the value now of str ?
  • Q How can i see the data in nested tables?
  • Q The head loss in a fully developed laminar flow in a circular pipe due to friction is directly proportional to … ?
  • Q What are indexes and mention different types of indexes?
  • Q What we can use to migrate use profile information from one computer to another
  • Q How communicate with diffrent tier in asp.net application.For example a ui function how intrect with business logic layer which is reside on another machine.
  • Q Is Problem Management relevant only for Infrastructure as per ITIL®?
  • Q What is the default property of datacontrol?