Ask Your Question
0

How to convert a mobile phone number from integer to string using PHP?

asked 2021-06-01 11:00:00 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-09-06 22:00:00 +0000

djk gravatar image

You can convert a mobile phone number from integer to string in PHP using the following code:

$number = 1234567890;

$phone_number = (string)$number;

echo $phone_number;

// Output: 1234567890

This code converts the integer value of the mobile phone number to a string using the (string) typecasting operator. The resulting value is stored in the $phone_number variable, which can be used for further processing or displaying.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-06-01 11:00:00 +0000

Seen: 14 times

Last updated: Sep 06 '22