Answer the question
In order to leave comments, you need to log in
Why doesn't PHPStorm see the variable from the included file?
Hello! I have code like this:
index.php
<?php
include ('array.php');
$string =implode ($array);
echo $string;
<?php
$array = array ( "lemon" => "yellow", "apple" => "green" , "strawberry" =>"red") ;
Answer the question
In order to leave comments, you need to log in
Three options
1) Use less includes and requests
2) Make documentation at the top of the main view file:
/**
* @var $array это переменная из подключаемого файла
*/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question