Search
 
SCRIPT & CODE EXAMPLE
 

PHP

difference between fetch assoc and fetch array or object php

mysql_fetch_assoc
	The function returns an associative array of strings that corresponds
	to the fetched row, or FALSE if there are no more rows.
	The associativity array tells us about the key value pair,
	whereas the key tells about any column name and the value tells 
	about the row value.

	Here we can map the column name as key and value as row. For example.
	Key is ID and value is corresponding name.

mysql_fetch_array

  This function name suggests that it returns an array.
  It fetches a result row as an associative array, a 
  numeric array, or both. It has both numeric values as 
  well as string values for a key.

mysql_fetch_object
This function returns row as an object and does not return an array.
    
   
Comment

PREVIOUS NEXT
Code Example
Php :: php curl post 
Php :: wordpress disable file mods 
Php :: get domain name laravel 
Php :: replace all numbers in string php 
Php :: php current page url 
Php :: migration types in laravel 
Php :: get raw query laravel 
Php :: php multi type parameter php multi type parameter 
Php :: open php tag 
Php :: how to get the average in sql in php 
Php :: date format in laravel month name day name 
Php :: wp wordpress logout 
Php :: php carbon from timestamp 
Php :: php hash password using bcrypt 
Php :: php artisan make:auth Command "make:auth" is not defined. 
Php :: woocommerce get product category name by id 
Php :: random string php 
Php :: add script tag to wordpress Head 
Php :: how to update radio button value in database using php 
Php :: wordpress get site title 
Php :: update pdo mysql php 
Php :: wp get author description 
Php :: assign php array into javascript 
Php :: max_execution_time php 
Php :: server cmd php 
Php :: add shortcode in short description 
Php :: php test if three values are equal 
Php :: laravel set config value runtime 
Php :: carbon difference between two dates 
Php :: wp logs 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =