Home › Forums › Add-ons › Repeater Field › Reapeater field problem with PHP 8 › Reply To: Reapeater field problem with PHP 8
basically, as I understand it, PHP 7 lets you do something like this
// create a value that is a string
$value = 'ABCD';
// use the above variable and replace it with an array
// this automatically unsets the variable and creates an array
$value[] = 'ABCD'
PHP 8 does not allow this. You would first need to reinitialize the variable to an array
// set a variable with a string value
$value = 'ABCD';
// set the var to an array
$value = array();
// set at array var
$value[] = 'ABCD'
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.