Just want to know what will hapen if i will set a variable in some line at the php file and than try to get the value in a different php script but in the same html code. Will it be this value or i have to use it in the same script.
Lets say -
<html>
<head>
<?php
$a = "Hello";
?>
<\head>
<body>
<?
echo $a;
?>
<\body>
<\html>
Will it be - "Hello"?
You have said 'In a different PHP script'.
That's not quite how PHP works - the php 'script' is all of the php that is executed when a page is requested.
But back to your question, think of it this way:
<?php
says "Here is some php code".
?>
says "This is not php code".
It's like talking to 2 people at once - the other person still knows what you're talking about when you turn back to them.
I agree with the comments though - these sort of things are very easy to check yourself :)