You are here: User Guide > Tasks > Working with Plugins > Inserting Code Snippets into your Script

Inserting Code Snippets into your Script

This procedure describes how to insert existing code snippets into your script.

Prerequisites

For more information on installing plugins in Zend Studio, see Customizing Zend Studio Using the Welcome Page.

 

 

Instructions on how to complete a procedure

To insert a code snippet into your script:

  1. Open the Code Gallery view by going to Window | Show View | Other | PHP Tools | Code Gallery.

  2. Place the cursor at the place in the editor into which you would like the code snippet to be entered.

  3. Expand the nodes next to the required User Code Gallery in the Code Gallery view -or- enter a string into the 'type filter text box' to search for a particular category or snippet.

  4. Select the required code snippet.
    The details of the code snippet, including its description and a preview of the code, will appear in the right-hand pane.

  5. Right-click the snippet and select Insert -or- click the Insert button on the view's toolbar.

The selected snippet will be entered into your script.

Note:

Many snippets contain PHP tags. If necessary, ensure that you remove existing PHP tags from your script to avoid duplication.

 

 

Related Links:

Using Code Galleries
Code Galleries

Creating New Code Gallery Entries

Interacting with Code Gallery Sites

 

 

©1999-2012 Zend Technologies LTD. All rights reserved.