Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP PHP Basics (Retired) PHP Datatypes Integers

What is different between Integer and String ??

What is different between Integer and String ??

4 Answers

An integer is a variable that specifically holds a numerical value. Whereas a string is a variable that can hold a range of characters (including numbers). Strings are usually enclosed in inverted commas like so: "This is a string." Where as Integers are just a number like so: 732

Hope this helps.

Sounds good to me! Best answer given.

okay thank you

Glad it helped. Could you mark my answer above as the approved answer for your question? It may help other people with the same query.

Thanks.

Yes here , STRING : is a variable that can hold a range of characters (including numbers). strings are usually enclosed in inverted commas like so: "This is a string." where as INTEGERS are just a number like so: 732

Please mark my original answer as the correct answer.

Here in array section, what is print_r() ?

You should ask this in a new question instead of in the comments of this question. More people will see your question and be able to help you then.