# Beginners - Learning PHP

**URL:** https://www.phphelp.com/c/beginners-learning-php/9.md

[Latest](https://www.phphelp.com/latest.md) · [Categories](https://www.phphelp.com/categories.md)

---

## [About the Beginners - Learning PHP category](https://www.phphelp.com/t/about-the-beginners-learning-php-category/8563)

<div class="topic-metadata">

**Author:** [@system](https://www.phphelp.com/u/system)\
**Replies:** 2\
**Last updated:** [December 17, 2024, 2:46pm UTC](https://www.phphelp.com/t/about-the-beginners-learning-php-category/8563 "2024-12-17T14:46:13Z")

</div>

A forum for beginning PHP programmers to ask questions. Please, no flames or put downs. There are no dumb questions only dumb answers and there probably are few truly dumb answers because they often lead to better ones.

---

## [Email Loop - One Email Rather Than Many](https://www.phphelp.com/t/email-loop-one-email-rather-than-many/31188)

<div class="topic-metadata">

**Author:** [@Leemo](https://www.phphelp.com/u/Leemo)\
**Replies:** 8\
**Last updated:** [March 2, 2020, 5:34pm UTC](https://www.phphelp.com/t/email-loop-one-email-rather-than-many/31188 "2020-03-02T17:34:37Z")

</div>

I have rows of data that when a save all button is pressed the contents of the changes are sent in an Email to myself. The code below works OK, but sends each record as a separate Email. I would prefer all the data to b…

---

## [How to format date variable](https://www.phphelp.com/t/how-to-format-date-variable/36594)

<div class="topic-metadata">

**Author:** [@babystarman](https://www.phphelp.com/u/babystarman)\
**Replies:** 2\
**Last updated:** [September 30, 2025, 8:22pm UTC](https://www.phphelp.com/t/how-to-format-date-variable/36594 "2025-09-30T20:22:39Z")

</div>

Hi, I am stumped by one small problem. I have a routine which gets data from a DB and displays it. It works very well, apart from how the date is displayed. I have tried several possible ways of formatting the date but …

---

## [Form checkboxes in arrays?](https://www.phphelp.com/t/form-checkboxes-in-arrays/36480)

<div class="topic-metadata">

**Author:** [@rossm](https://www.phphelp.com/u/rossm)\
**Replies:** 2\
**Last updated:** [May 19, 2025, 9:55am UTC](https://www.phphelp.com/t/form-checkboxes-in-arrays/36480 "2025-05-19T09:55:16Z")

</div>

Hello, I’m converting a site I created many years ago from Classic ASP to PHP and learning PHP at the same time. I’m finding PHP is more “nuts and bolts” level than ASP - for example I’ve written my own Request\_Cookies a…

---

## [Continue without waiting](https://www.phphelp.com/t/continue-without-waiting/36421)

<div class="topic-metadata">

**Author:** [@kwat](https://www.phphelp.com/u/kwat)\
**Replies:** 3\
**Last updated:** [April 10, 2025, 5:46pm UTC](https://www.phphelp.com/t/continue-without-waiting/36421 "2025-04-10T17:46:34Z")

</div>

I have a script that collects data and then sends out separate emails to various people. I don’t want the user to wait while the emails are sent. Can I call the email function but have the main script continue without wa…

---

## [Help me hide admin menu item in WP dashboard](https://www.phphelp.com/t/help-me-hide-admin-menu-item-in-wp-dashboard/36426)

<div class="topic-metadata">

**Author:** [@rolandd3124](https://www.phphelp.com/u/rolandd3124)\
**Replies:** 2\
**Last updated:** [April 5, 2025, 9:12pm UTC](https://www.phphelp.com/t/help-me-hide-admin-menu-item-in-wp-dashboard/36426 "2025-04-05T21:12:34Z")

</div>

Can someone help me understand what I am doing incorrectly here? I am trying to hide the “Members” menu item in Wordpress Dashboard from administrators. Here is what I have: Members (menu item is /wp-admin/admin.php?pa…

---

## [Query Database with php Error](https://www.phphelp.com/t/query-database-with-php-error/36405)

<div class="topic-metadata">

**Author:** [@Lensmeister](https://www.phphelp.com/u/Lensmeister)\
**Replies:** 3\
**Last updated:** [March 8, 2025, 9:45am UTC](https://www.phphelp.com/t/query-database-with-php-error/36405 "2025-03-08T09:45:42Z")

</div>

Evening, I am learning php ,mysql and I have a bit of a problem. I have a Database (hst\_working) with a table (hst\_workings) I know not the best naming conventions. The table has the following fields: date, time, tid…

---

## [Hello, i need to get onlyone value from the second select, in the select case of the table, primo for the only 1° case td and the others blank, secondo for the 2° and other blank etc..one selection for each. Someone can help me please.?](https://www.phphelp.com/t/hello-i-need-to-get-onlyone-value-from-the-second-select-in-the-select-case-of-the-table-primo-for-the-only-1-case-td-and-the-others-blank-secondo-for-the-2-and-other-blank-etc-one-selection-for-each-someone-can-help-me-please/36399)

<div class="topic-metadata">

**Author:** [@stylelab](https://www.phphelp.com/u/stylelab)\
**Replies:** 4\
**Last updated:** [February 24, 2025, 12:27am UTC](https://www.phphelp.com/t/hello-i-need-to-get-onlyone-value-from-the-second-select-in-the-select-case-of-the-table-primo-for-the-only-1-case-td-and-the-others-blank-secondo-for-the-2-and-other-blank-etc-one-selection-for-each-someone-can-help-me-please/36399 "2025-02-24T00:27:49Z")

</div>

\<html\> \<body bgcolor="white"\> \<font face='courier'\> \<font color='red'\> \<form action='test.php' method='GET'\> \<select id="op" name="ops"\> \<option value=""\>seleziona....\</option\> \<option value="a"\>a\</option\> \<o…

---

## [405 error on post (jquery/JavaScript to php)](https://www.phphelp.com/t/405-error-on-post-jquery-javascript-to-php/36352)

<div class="topic-metadata">

**Author:** [@temceo](https://www.phphelp.com/u/temceo)\
**Replies:** 4\
**Last updated:** [December 28, 2024, 4:37pm UTC](https://www.phphelp.com/t/405-error-on-post-jquery-javascript-to-php/36352 "2024-12-28T16:37:29Z")

</div>

Hi I am new to PHP and I am trying to learn how to post from input on html (jQuery or JavaScript) via a php file, but I always get a 405 error - not allowed. I am not sure on how to overcome the error. I have looked on…

---

## [What is the problem?](https://www.phphelp.com/t/what-is-the-problem/36332)

<div class="topic-metadata">

**Author:** [@Jokrsnl93](https://www.phphelp.com/u/Jokrsnl93)\
**Replies:** 0\
**Last updated:** [December 2, 2024, 9:59pm UTC](https://www.phphelp.com/t/what-is-the-problem/36332 "2024-12-02T21:59:19Z")

</div>

i have tried to use everything and import everything till now but in migration table of my users the hasOne function is not defined. i tried it in APP\\model/Users and it worked and the auto complete shows it… in migratio…

---

## [PLEASE HELP: Multiple "Cannot modify header information" after updating WordPress](https://www.phphelp.com/t/please-help-multiple-cannot-modify-header-information-after-updating-wordpress/36316)

<div class="topic-metadata">

**Author:** [@Passmore16](https://www.phphelp.com/u/Passmore16)\
**Replies:** 2\
**Last updated:** [November 19, 2024, 4:34pm UTC](https://www.phphelp.com/t/please-help-multiple-cannot-modify-header-information-after-updating-wordpress/36316 "2024-11-19T16:34:51Z")

</div>

Hi! I work for a marketing agency in content, so don’t have much knowledge of technical wordpress/PHP stuff. I’ve recently updated the site’s theme and WordPress, and received multiple “Cannot modify header information”…

---

## [Get string at certain position after a string and append](https://www.phphelp.com/t/get-string-at-certain-position-after-a-string-and-append/36292)

<div class="topic-metadata">

**Author:** [@kokwo.com](https://www.phphelp.com/u/kokwo.com)\
**Replies:** 4\
**Last updated:** [October 7, 2024, 5:04pm UTC](https://www.phphelp.com/t/get-string-at-certain-position-after-a-string-and-append/36292 "2024-10-07T17:04:33Z")

</div>

I have got to replace a string with an html string. The string contain a certain keyword ( example: Hebrews, Genesis) and some number with symbol at the back (9:28 or 1:2-3). I want to replace the string with html equiv…

---

## [Generate random grid map](https://www.phphelp.com/t/generate-random-grid-map/36253)

<div class="topic-metadata">

**Author:** [@Elvium](https://www.phphelp.com/u/Elvium)\
**Replies:** 4\
**Last updated:** [August 28, 2024, 3:28pm UTC](https://www.phphelp.com/t/generate-random-grid-map/36253 "2024-08-28T15:28:29Z")

</div>

I’m trying to make a random grid map. It works already fine but: #1. The last corner has always a “door” at the top and the left #2. Dead end fields may never be “green” #3. Not allowed to walk in cirlcles My code as…

---

## [Nl2br() How to call it when viewing textarea data in database](https://www.phphelp.com/t/nl2br-how-to-call-it-when-viewing-textarea-data-in-database/36238)

<div class="topic-metadata">

**Author:** [@Mike2](https://www.phphelp.com/u/Mike2)\
**Replies:** 5\
**Last updated:** [August 8, 2024, 9:20pm UTC](https://www.phphelp.com/t/nl2br-how-to-call-it-when-viewing-textarea-data-in-database/36238 "2024-08-08T21:20:20Z")

</div>

Textarea list of Names inserted into the database from form is OK ,everything works accept searching for anything more than 1st entry in the textarea then i get nothing is found. Looks like one big string that needs to …

---

## [Help Needed: PHP Complex Error with Ruby on Rails Installation](https://www.phphelp.com/t/help-needed-php-complex-error-with-ruby-on-rails-installation/36218)

<div class="topic-metadata">

**Author:** [@fatimaahmed](https://www.phphelp.com/u/fatimaahmed)\
**Replies:** 1\
**Last updated:** [August 6, 2024, 8:16pm UTC](https://www.phphelp.com/t/help-needed-php-complex-error-with-ruby-on-rails-installation/36218 "2024-08-06T20:16:36Z")

</div>

Hey everyone, I hope you’re all doing well! I’m currently tangled up in a bit of a mess and could really use some help from the PHP community. Here’s the situation: I’m working on a PHP project where I’m integrating so…

---

## [Errors with $fetch variable](https://www.phphelp.com/t/errors-with-fetch-variable/36226)

<div class="topic-metadata">

**Author:** [@overdamos](https://www.phphelp.com/u/overdamos)\
**Replies:** 7\
**Last updated:** [August 1, 2024, 6:24pm UTC](https://www.phphelp.com/t/errors-with-fetch-variable/36226 "2024-08-01T18:24:12Z")

</div>

Hello guys. I know this might sound like a really stupid question but Im really a beginner. Im learning PHP, HTML and others due to school. I wanted to create a simple registration and login page with profiles using data…

---

## [Ответ: Parse error: syntax error, unexpected $end in A:\\home\\meddostavka.ru\\www\\log.php on line 26](https://www.phphelp.com/t/parse-error-syntax-error-unexpected-end-in-a-home-meddostavka-ru-www-log-php-on-line-26/36222)

<div class="topic-metadata">

**Author:** [@rassell](https://www.phphelp.com/u/rassell)\
**Replies:** 1\
**Last updated:** [July 31, 2024, 1:27am UTC](https://www.phphelp.com/t/parse-error-syntax-error-unexpected-end-in-a-home-meddostavka-ru-www-log-php-on-line-26/36222 "2024-07-31T01:27:21Z")

</div>

Ответ: Parse error: syntax error, unexpected $end in A:\\home\\meddostavka.ru\\www\\log.php on line 26 Denwer, PHP Version 5.3.13 \<?php //просто функция function translit($str) { $rus = array('А', 'Б', 'В', 'Г', 'Д', …

---

## [Filter with department and date range of attendance](https://www.phphelp.com/t/filter-with-department-and-date-range-of-attendance/36214)

<div class="topic-metadata">

**Author:** [@allenvsantiago](https://www.phphelp.com/u/allenvsantiago)\
**Replies:** 2\
**Last updated:** [July 17, 2024, 3:45pm UTC](https://www.phphelp.com/t/filter-with-department-and-date-range-of-attendance/36214 "2024-07-17T15:45:37Z")

</div>

if(isset($\_GET\[‘from\_date’\]) && isset($\_GET\[‘to\_date’\])) { $from\_date = $\_GET\[‘from\_date’\]; $to\_date = $\_GET\[‘to\_date’\]; $query = "SELECT \* FROM tbl\_attendance INNER JOIN tbl\_user ON tbl\_user.IDNUMBER = tbl\_atten…

---

## [Trying to create a file with links for the search engine to find](https://www.phphelp.com/t/trying-to-create-a-file-with-links-for-the-search-engine-to-find/36145)

<div class="topic-metadata">

**Author:** [@Hotspringsrus](https://www.phphelp.com/u/Hotspringsrus)\
**Replies:** 4\
**Last updated:** [July 11, 2024, 7:55am UTC](https://www.phphelp.com/t/trying-to-create-a-file-with-links-for-the-search-engine-to-find/36145 "2024-07-11T07:55:27Z")

</div>

I am trying to create a simple index of links to txt files I have uploaded. I want them to be discovered by the search engine. I believe my code is correct as it is a simple open and then write to the file. The error app…

---

## [Php will not show all transaktions if too many digits](https://www.phphelp.com/t/php-will-not-show-all-transaktions-if-too-many-digits/36197)

<div class="topic-metadata">

**Author:** [@Freddy](https://www.phphelp.com/u/Freddy)\
**Replies:** 5\
**Last updated:** [July 4, 2024, 6:49am UTC](https://www.phphelp.com/t/php-will-not-show-all-transaktions-if-too-many-digits/36197 "2024-07-04T06:49:06Z")

</div>

Hi I am new in this forum, but I hope its ok ask for a little help. I have installed a virtual server and NetBeans and taught myself some php and mysql and have successfully created some programs to give me an overview…

---

## [What is a good Local Development Environment setup?](https://www.phphelp.com/t/what-is-a-good-local-development-environment-setup/35566)

<div class="topic-metadata">

**Author:** [@thinsoldier](https://www.phphelp.com/u/thinsoldier)\
**Replies:** 2\
**Last updated:** [May 13, 2024, 9:42pm UTC](https://www.phphelp.com/t/what-is-a-good-local-development-environment-setup/35566 "2024-05-13T21:42:16Z")

</div>

I have a few dozen php4/php5 era projects I want to ressurect. I haven’t written any PHP or any other code since like 2019. I used to use XAMPP (php5.5) in OSX - It was not a good experience because several OSX terminal…

---

## [File\_get\_contents error](https://www.phphelp.com/t/file-get-contents-error/36038)

<div class="topic-metadata">

**Author:** [@Hotspringsrus](https://www.phphelp.com/u/Hotspringsrus)\
**Replies:** 2\
**Last updated:** [February 21, 2024, 4:33am UTC](https://www.phphelp.com/t/file-get-contents-error/36038 "2024-02-21T04:33:08Z")

</div>

I am so close to getting what I want. I have converted a number of pdf files to text. I then renamed the files with php extension so that I can include the contents above the form that selects the files. It all works exc…

---

## [Read/write to a csv file](https://www.phphelp.com/t/read-write-to-a-csv-file/36035)

<div class="topic-metadata">

**Author:** [@Hotspringsrus](https://www.phphelp.com/u/Hotspringsrus)\
**Replies:** 2\
**Last updated:** [February 19, 2024, 11:20pm UTC](https://www.phphelp.com/t/read-write-to-a-csv-file/36035 "2024-02-19T23:20:40Z")

</div>

I am trying to read a couple column values of a spreadsheet (13 columns X 4000 rows) saved as a csv file. I believe my code is correctly looking to process the csv file by rows. When I run the code the parser appears to …

---

## [Update Multiple Records if Form Field is not NULL](https://www.phphelp.com/t/update-multiple-records-if-form-field-is-not-null/35979)

<div class="topic-metadata">

**Author:** [@lwaters5](https://www.phphelp.com/u/lwaters5)\
**Replies:** 4\
**Last updated:** [February 9, 2024, 4:31am UTC](https://www.phphelp.com/t/update-multiple-records-if-form-field-is-not-null/35979 "2024-02-09T04:31:44Z")

</div>

I am trying to update multiple records in my database if a person uploads a new file. For some reason, the page will not work. Any suggestions would be great. Thanks $district\_data = new WA\_MySQLi\_RS("district\_data",$sd…

---

## [While Uploading a file: Only variables should be passed by reference in C:\\xampp\\htdoc](https://www.phphelp.com/t/while-uploading-a-file-only-variables-should-be-passed-by-reference-in-c-xampp-htdoc/35966)

<div class="topic-metadata">

**Author:** [@ce1c4bb](https://www.phphelp.com/u/ce1c4bb)\
**Replies:** 2\
**Last updated:** [January 24, 2024, 4:48am UTC](https://www.phphelp.com/t/while-uploading-a-file-only-variables-should-be-passed-by-reference-in-c-xampp-htdoc/35966 "2024-01-24T04:48:22Z")

</div>

When trying to execute this simple PHP code, i received the following error message: Only variables should be passed by reference in C:\\xampp\\htdoc" on line 20 Could you please explain why and can i solve this issue ? …

---

## [Remote file](https://www.phphelp.com/t/remote-file/36007)

<div class="topic-metadata">

**Author:** [@Hotspringsrus](https://www.phphelp.com/u/Hotspringsrus)\
**Replies:** 1\
**Last updated:** [February 5, 2024, 3:15pm UTC](https://www.phphelp.com/t/remote-file/36007 "2024-02-05T15:15:10Z")

</div>

I have content that I moved from a remote server and renamed making a new file date. I want to provide the original creation date of the remote file in a form. I was able to use filectime without issue for local files bu…

---

## [Php as a tag in html form](https://www.phphelp.com/t/php-as-a-tag-in-html-form/36003)

<div class="topic-metadata">

**Author:** [@Hotspringsrus](https://www.phphelp.com/u/Hotspringsrus)\
**Replies:** 3\
**Last updated:** [February 2, 2024, 4:59am UTC](https://www.phphelp.com/t/php-as-a-tag-in-html-form/36003 "2024-02-02T04:59:04Z")

</div>

I am trying to loop through a csv file that has a number of file names that I want to display in a form. The user checks the selections and then I display the contents as a single page. I read a post that showed how to l…

---

## [sendmail.php](https://www.phphelp.com/t/sendmail-php/35896)

<div class="topic-metadata">

**Author:** [@charlyne](https://www.phphelp.com/u/charlyne)\
**Replies:** 1\
**Last updated:** [January 19, 2024, 2:44am UTC](https://www.phphelp.com/t/sendmail-php/35896 "2024-01-19T02:44:52Z")

</div>

Hello everyone, I would like you to tell me what error the sendmail file contains because it detects an error on the $siteOwnersEmail function I don’t know the syntax for entering my address Thank you for your answers …

---

## [Send form in php](https://www.phphelp.com/t/send-form-in-php/35936)

<div class="topic-metadata">

**Author:** [@Spre](https://www.phphelp.com/u/Spre)\
**Replies:** 1\
**Last updated:** [December 20, 2023, 7:37pm UTC](https://www.phphelp.com/t/send-form-in-php/35936 "2023-12-20T19:37:00Z")

</div>

I am getting an array error, now it is still sending the email, and displaying the message(of course i would really like it to be handled all on the same html page not a separate page, but I can not figure out what the e…

---

## [Building blocks](https://www.phphelp.com/t/building-blocks/35904)

<div class="topic-metadata">

**Author:** [@BBuchanan](https://www.phphelp.com/u/BBuchanan)\
**Replies:** 1\
**Last updated:** [December 8, 2023, 1:00am UTC](https://www.phphelp.com/t/building-blocks/35904 "2023-12-08T01:00:17Z")

</div>

So I figured I’d actually get in here and ask, just because my brain is trying to come to terms with oop. Let me start off with, I haven’t a clue. But I think that I can explain it in a way that kinda sorta makes sense.…

[Next page](https://www.phphelp.com/c/beginners-learning-php/9.md?page=1)
