PHP newbie here
Can anyone please tell me what is wrong with the below syntax. I have a maximum of 4 files - $created_page1, $created_page2 each with a corresponding page title etc and would like to process these in a loop. However PHP throws a wobbly every time I try to concatenate the string and loop number - specifically $created_page.$num_pages doesn't result in sending $created_page1 or $created_page2 to the function, instead it just converts the string and number to an integer. Very basic I am sure but I would be very grateful for any help or a nicer solution that I can easily understand. Thanks in advance!
$addit_pages == 4;
for ($num_pages=1;$num_pages<=$addit_pages ;$num_pages++) {
replaceFileContent ($dir,$created_page.$num_pages,"*page_title*",$page_title.$num_pages);
//replaceFileContent ($dir,$created_page2,"*page_title*",$page_title2);
//replaceFileContent ($dir,$created_page1,"*page_title*",$page_title3);
//replaceFileContent ($dir,$created_page3,"*page_title*",$page_title4);
}
"*page_title*"?