Get your free app now for your personal or professional use. Start coding right away.

About The Author

Gopinath is a B.E. CSE Gradian and a blogger by passion. He is currently reading on bioinformatics. If you want to get in touch with him, you can drop a mail to or you can drop a mail to Google Plus

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it. Privacy Policy.OkPrivacy policyQ:

Getting the value of a string inside a variable

I’m trying to get the value of a string inside a variable
$sql = ‘SELECT * FROM table1 WHERE field1 = “value”‘;
$result = $con->query($sql);
while($row = $result->fetch_array(MYSQL_ASSOC)){
$value = $row[‘field2’];

If I var_dump $row[‘field2’] it returns the right value, but I cannot seem to get the value. I always get NULL.
If I do echo $value; it prints NULL.
How can I get the value?


Use the $result->fetch_assoc() function to return an array of your results.
This will fetch and return the data from the database in the most efficient way.
This is how it works:

If you want to use PHP:
while($row = $result->fetch_array(MYSQL_ASSOC)){
$value = $row[‘field2’];

Shandong Ganfeng Automatic Co.,Ltd was established in 2003 and has been engaged in manufacturing and sales of industrial instruments for over a decade. We focus on the improvement of our products continuously. To be the best manufacturer, we have established our own factory and will continue to innovate and improve our products. Our products mainly include power supply, lab instrument, audio-visual instrument, environmental instrument and some other kinds of instrument. eea19f52d2

• Autoruns Portable is a utility which is dedicated to providing process information about the process that is currently running. This process information is determined by the hardware detection, hardware detection, the currently logged-in user, or the current computer startup or logon. The information can be gathered by the software in a particular way by using a batch file that is set to launch at the time the system boots, runs the autoruns.exe program, or runs after the user logs into Windows.
• Autoruns Portable can detect the following information regarding the process:
o The process name
o The process path
o The process parent path
o The process file name
o The process exe path
o The process startup location
o The process startup arguments
o The process user name
o The process description
o The process icon
o The process size
• Autoruns Portable can also detect the following information regarding the file:
o The file name
o The file size
o The file path
o The file attributes
o The file creator
o The file last access
o The file last modified
o The file security type
o The file attributes
• Autoruns Portable will also display the current user of the process if a user is logged in to the system.
• Some of the information listed above can be extended in Autoruns Portable. The process can be started to get more information.
• Autoruns Portable has a non-modal user interface so you can interact with the program while it is in the process of gathering information.
• Autoruns Portable is a non-invasive process monitoring tool. It will not leave any registry traces, not modify anything on your hard drive or install any files on your computer.
• The program does not require any installation. It is a stand-alone process monitoring tool, and is able to help the end user detect and remove unwanted processes from Windows that are already in use.
• Autoruns Portable provides an extensive Help file.
• If you like to get more information about Autoruns Portable, visit its web site.

[color=red]Autoruns Portable[/color]

[color=red]Latest News:[/color]
Autoruns Portable latest version released!
You can get it now on

I have found this free spyware remover that will remove

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *