Only the first digit of my integer value is displayed in Php

Marky Borja

I'm having a problem about getting the exact value of my integer in my database, because when i get it's value only the first digit of it's integer is displayed in php. For example the integer value in my database is "11" only "1" is displayed in my php. Here's my query.

$count=0;
$query="SELECT id from register";
$result = mysql_query($query);
('error in query:$query. ' .mysql_error());

  if(mysql_num_rows($result)>0){
    while($row=mysql_fetch_assoc($result)){
      extract($row);
$id[$count]=$id;
$count++;
}
}
 for($x=0; $x<$count; $x++){
echo"".$id[$count];
}
Muhammad Ahmed
    $count=0;
$id = array();
$query="SELECT id from register";
$result = mysql_query($query);
('error in query:$query. ' .mysql_error());

if(mysql_num_rows($result)>0){
    while($row=mysql_fetch_assoc($result)){
        extract($row);
        $id[$count]=$row['id'];
        $count++;
    }
}
for($x=0; $x<$count; $x++){
    echo "".$id[$count];
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

MySQL and PHP: Only the first field in the table is displayed

From Dev

Match only first occurrence of digit

From Dev

fscanf only scans in the first value of my file

From Dev

Add only the first value in my list of arrays

From Dev

PHP only sending the first word in my sentense?

From Dev

Is it possible to Store 0 as the first digit in integer variable

From Dev

Is it possible to Store 0 as the first digit in integer variable

From Dev

how to swap the first digit(if not largest among the digits) with largest digit in an integer

From Dev

Replace first and last digit with * in php

From Dev

Why is my list function only outputting first value of my array?

From Dev

Simpler Way to Get Digit Value From an Integer

From Dev

PHP input and output of four digit integer

From Dev

Remove any digit only in first N characters

From Dev

Sorting algorithms in Ruby sorting only by first digit

From Dev

Barcode Scanner only displaying first digit of barcode

From Dev

Barcode Scanner only displaying first digit of barcode

From Dev

Insert only stores the first digit, remainder are ignored

From Dev

What is the first chmod octal digit in a four-digit value for?

From Dev

only first value is accessible in range of value returned by php

From Dev

How to check my input field contains integer value in PHP?

From Dev

How to check my input field contains integer value in PHP?

From Dev

Only the first checkbox value is being added to my table

From Dev

Only the first checkbox value is being added to my table

From Dev

Magento product grid block code breaks PHP after only the first product is displayed

From Dev

Find and replace a digit except first one in PHP

From Dev

How do I test if the first digit of an integer is a 7?

From Dev

Why does my removeDuplicates method only remove the duplicate integer the first time it encounters it?

From Dev

AVFoundation - combine videos only one the first is displayed

From Dev

Get EditTextValue and parse it into a decimal with only one digit for integer part

Related Related

  1. 1

    MySQL and PHP: Only the first field in the table is displayed

  2. 2

    Match only first occurrence of digit

  3. 3

    fscanf only scans in the first value of my file

  4. 4

    Add only the first value in my list of arrays

  5. 5

    PHP only sending the first word in my sentense?

  6. 6

    Is it possible to Store 0 as the first digit in integer variable

  7. 7

    Is it possible to Store 0 as the first digit in integer variable

  8. 8

    how to swap the first digit(if not largest among the digits) with largest digit in an integer

  9. 9

    Replace first and last digit with * in php

  10. 10

    Why is my list function only outputting first value of my array?

  11. 11

    Simpler Way to Get Digit Value From an Integer

  12. 12

    PHP input and output of four digit integer

  13. 13

    Remove any digit only in first N characters

  14. 14

    Sorting algorithms in Ruby sorting only by first digit

  15. 15

    Barcode Scanner only displaying first digit of barcode

  16. 16

    Barcode Scanner only displaying first digit of barcode

  17. 17

    Insert only stores the first digit, remainder are ignored

  18. 18

    What is the first chmod octal digit in a four-digit value for?

  19. 19

    only first value is accessible in range of value returned by php

  20. 20

    How to check my input field contains integer value in PHP?

  21. 21

    How to check my input field contains integer value in PHP?

  22. 22

    Only the first checkbox value is being added to my table

  23. 23

    Only the first checkbox value is being added to my table

  24. 24

    Magento product grid block code breaks PHP after only the first product is displayed

  25. 25

    Find and replace a digit except first one in PHP

  26. 26

    How do I test if the first digit of an integer is a 7?

  27. 27

    Why does my removeDuplicates method only remove the duplicate integer the first time it encounters it?

  28. 28

    AVFoundation - combine videos only one the first is displayed

  29. 29

    Get EditTextValue and parse it into a decimal with only one digit for integer part

HotTag

Archive