Johnny G Junior's NoteBook Treasures: 2013

Thursday, January 31, 2013

Define Variable in Function to use GLOBALLY

Need to define a variable within a function, but you'd like to use it throughout your script..... here is an example on how to create it and how you can use it.
 ///  how to define a variable in a function to use globals  
 function myCode(){  
   $GLOBALS['magic'] = "what";       
 myCode(); /// -- run function   
 echo $magic; //<-- OUTPUT WHAT.  
 function test(){  
      echo $GLOBALS['magic'];  /// <-- output What  

Monday, January 28, 2013

Cloning Brush Shapes

One of the keys to successfully using the clone tool is using a brush that does not have a perfect shape. Below is an image of some cloning brush shapes. If you create a brush shape similar to these and add some dynamics to the brush (ie. rotation, jitter), you will find your image to be a bit more believable and hard to spot patterns.